/* Floating Widget (Light Mode) */
.contact-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 998;
}

.widget-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.widget-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.8;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.widget-toggle:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 40px rgba(244, 114, 182, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.widget-toggle:hover::before {
    opacity: 1;
}

.phone-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: phoneRing 4s infinite ease-in-out;
}

@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg) scale(1); }
    5%, 15% { transform: rotate(-10deg) scale(1.05); }
    10%, 20% { transform: rotate(10deg) scale(1.05); }
    25% { transform: rotate(0deg) scale(1); }
}

.widget-content {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    background: rgba(19, 21, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.widget-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.widget-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.widget-close:hover {
    color: white;
}

.widget-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget-form .form-group label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    display: block;
}

.widget-form .form-group input,
.widget-form .form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    transition: all 0.2s;
}

.widget-form .form-group input::placeholder,
.widget-form .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.widget-form .form-group input:focus,
.widget-form .form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.widget-content .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    text-align: left;
}

.widget-content .form-checkbox input[type="checkbox"] {
    appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0;
    font: inherit;
    color: white;
    width: 1.15em;
    height: 1.15em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: grid;
    place-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.125em;
    transition: all 0.2s ease;
}

.widget-content .form-checkbox input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    background-color: white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.widget-content .form-checkbox input[type="checkbox"]:checked {
    background-color: white;
    border-color: white;
}

.widget-content .form-checkbox input[type="checkbox"]:checked::before {
    transform: scale(1);
    box-shadow: inset 1em 1em rgba(19, 21, 31, 1);
    background-color: rgba(19, 21, 31, 1);
}

.widget-content .form-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.widget-content .form-checkbox a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.widget-content .form-checkbox a:hover {
    color: white;
    text-decoration-color: white;
}

.widget-submit {
    width: 100%;
    margin-top: 0.5rem;
    background: white;
    color: black;
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.widget-submit:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

/* Form Messages */
.form-message-box {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
    padding: 0.75rem;
    border-radius: 8px;
}
.form-message-box.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.widget-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
    color: white;
}

.success-icon {
    font-size: 3rem;
    color: #4ade80;
    margin-bottom: 1rem;
    animation: pop 0.5s cubic-bezier(0.5, 1.5, 0.5, 1.5);
}

@keyframes pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Mobile Widget */
@media (max-width: 768px) {
    .widget-content {
        position: fixed;
        right: 1rem;
        left: 1rem;
        width: auto;
        bottom: 90px;
    }
    .contact-widget {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
