/* Hızlı iletişim widget — responsive, açılır/kapanır */
.contact-widget {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 9999;
    font-family: 'Inter', system-ui, sans-serif;
}

.contact-widget__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 34, 64, 0.45);
    backdrop-filter: blur(2px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-widget.is-open .contact-widget__backdrop {
    display: block;
    opacity: 1;
}

.contact-widget__panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 300px;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(13, 34, 64, 0.22), 0 0 0 1px rgba(13, 34, 64, 0.06);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0.3s;
    pointer-events: none;
}

.contact-widget.is-open .contact-widget__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.contact-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #0d2240 0%, #152d52 100%);
    border-bottom: 2px solid #d4af37;
}

.contact-widget__head-text span {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d4af37;
}

.contact-widget__head-text strong {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
}

.contact-widget__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.contact-widget__close:hover {
    background: #d4af37;
    color: #0d2240;
}

.contact-widget__close svg {
    width: 16px;
    height: 16px;
}

.contact-widget__body {
    padding: 0.5rem 0;
}

.contact-widget__link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.contact-widget__link:last-child {
    border-bottom: none;
}

.contact-widget__link:hover {
    background: #fdfbf7;
}

.contact-widget__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: transform 0.2s, background 0.2s;
}

.contact-widget__link:hover .contact-widget__icon {
    transform: scale(1.05);
}

.contact-widget__icon--wa {
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.2);
}

.contact-widget__icon--wa svg {
    width: 22px;
    height: 22px;
    fill: #25D366;
}

.contact-widget__link--wa:hover .contact-widget__icon--wa {
    background: #25D366;
}

.contact-widget__link--wa:hover .contact-widget__icon--wa svg {
    fill: #fff;
}

.contact-widget__icon--call svg {
    width: 20px;
    height: 20px;
    stroke: #d4af37;
    fill: none;
}

.contact-widget__link--call:hover .contact-widget__icon--call {
    background: #0d2240;
    border-color: #0d2240;
}

.contact-widget__link--call:hover .contact-widget__icon--call svg {
    stroke: #d4af37;
}

.contact-widget__icon--form svg {
    width: 20px;
    height: 20px;
    stroke: #0d2240;
    fill: none;
}

.contact-widget__link-text span {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9ca3af;
}

.contact-widget__link-text strong {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 600;
    color: #0d2240;
}

.contact-widget__toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4af37 0%, #c9a430 100%);
    color: #0d2240;
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45), 0 2px 8px rgba(13, 34, 64, 0.15);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
    position: relative;
    margin-left: auto;
}

.contact-widget__toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 36px rgba(212, 175, 55, 0.5);
}

.contact-widget__toggle:active {
    transform: scale(0.96);
}

.contact-widget__toggle svg {
    width: 26px;
    height: 26px;
    transition: opacity 0.2s, transform 0.25s;
}

.contact-widget__toggle .icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.contact-widget.is-open .contact-widget__toggle {
    background: #0d2240;
    color: #d4af37;
    box-shadow: 0 8px 28px rgba(13, 34, 64, 0.35);
}

.contact-widget.is-open .contact-widget__toggle .icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.contact-widget.is-open .contact-widget__toggle .icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.contact-widget__pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    animation: contactPulse 2s ease-out infinite;
    pointer-events: none;
}

.contact-widget.is-open .contact-widget__pulse {
    display: none;
}

@keyframes contactPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 480px) {
    .contact-widget__panel {
        position: fixed;
        bottom: calc(72px + env(safe-area-inset-bottom));
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
        transform: translateY(20px);
        transform-origin: bottom center;
    }

    .contact-widget.is-open .contact-widget__panel {
        transform: translateY(0);
    }

    .contact-widget__toggle {
        width: 52px;
        height: 52px;
    }
}

@media (min-width: 768px) {
    .contact-widget__backdrop {
        display: none !important;
    }
}
