/* Floating Widget */
.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: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.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;
}

.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;
    }
}
