/* Phone Dropdown Styles - Modern Sleek Design */
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phone-dropdown-item {
    position: relative;
}

/* Create an invisible hover bridge between trigger and dropdown */
.phone-dropdown-item.active .hover-bridge {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px; /* Bridge height to cover the gap */
    background: transparent;
    z-index: 9998;
    pointer-events: auto; /* Allow hover detection on this area */
}

.phone-dropdown-item .info-icon img {
    animation: bounce 3s ease-in-out infinite;
}

.phone-dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid rgba(0, 124, 186, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Status Indicator */
.status-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    transition: all 0.3s ease;
    z-index: 2;
}

.status-indicator[data-status="open"] {
    background-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
    animation: pulse-green 2s infinite;
}

.status-indicator[data-status="closed"] {
    background-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.status-indicator[data-status="checking"] {
    background-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.phone-dropdown-trigger:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: rgba(0, 124, 186, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.phone-dropdown-trigger .dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
}

.phone-dropdown-item.active .dropdown-arrow {
    transform: rotate(180deg);
    color: #007cba;
}

.phone-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 500px;
    max-width: 600px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 9999;
}

/* Add a subtle connecting element between trigger and dropdown */
.phone-dropdown-item.active::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 20px;
    width: 2px;
    height: 8px;
    background: linear-gradient(to bottom, rgba(0, 124, 186, 0.1), transparent);
    pointer-events: none;
    z-index: 10000;
}

.phone-dropdown-item.active .phone-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.phone-dropdown-content {
    padding: 6px;
}

.phone-section {
    margin-bottom: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 124, 186, 0.08);
    border-radius: 8px;
}

.phone-section:last-child {
    margin-bottom: 0;
}

.phone-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
}

.phone-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.phone-section-header .phone-section-title {
    margin: 0;
    color: #1e293b;
}

.phone-call-button {
    background: linear-gradient(135deg, #007cba 0%, #0099cc 100%);
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 124, 186, 0.2);
    border: none;
}

.phone-call-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.phone-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.phone-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.phone-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.phone-number-link {
    font-size: 14px;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.phone-number-link:hover {
    background: rgba(0, 124, 186, 0.1);
    color: #007cba;
}

.operator-icon {
    height: 14px;
    width: 14px;
    object-fit: contain;
    margin-right: 4px;
    vertical-align: middle;
    transition: all 0.3s ease;
    display: none;
}

.phone-link {
    flex: 1 1 calc(50% - 4px);
    font-size: 14px;
    color: #334155;
    text-decoration: none;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 124, 186, 0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Larger text for manager contacts (excluding Славутичі section) */
.phone-section:nth-child(2) .phone-link .phone-label {
    font-size: 16px;
    font-weight: 700;
}

.phone-section:nth-child(2) .phone-link .phone-number {
    font-size: 16px;
    font-weight: 600;
}

/* Larger text for Лук"янівська section */
.phone-link.highlight .phone-label {
    font-size: 16px;
    font-weight: 700;
}

.phone-link.highlight .phone-number-link {
    font-size: 16px;
    font-weight: 600;
}

.phone-link:hover {
    background: rgba(255, 255, 255, 1);
    color: #334155;
    text-decoration: none;
    border-color: rgba(0, 124, 186, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.phone-link:hover .phone-label,
.phone-link:hover .phone-number {
    color: #334155;
}

.phone-link.highlight {
    background: linear-gradient(135deg, #007cba 0%, #0099cc 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

.phone-link.highlight .phone-label,
.phone-link.highlight .phone-number,
.phone-link.highlight .phone-number-link {
    color: #ffffff;
}

.phone-link.highlight:hover {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.3);
}

.phone-link.highlight:hover .phone-label,
.phone-link.highlight:hover .phone-number,
.phone-link.highlight:hover .phone-number-link {
    color: #ffffff;
}

.phone-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.address-info,
.working-hours {
    color: #475569;
    line-height: 1.5;
}

.contact-info-row {
    display: flex;
    gap: 12px;
}

.address-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    transition: all 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

.address-link:hover {
    transform: translateY(-1px);
}

.address-link:hover .phone-section {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 124, 186, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-info-row .phone-section {
    flex: 1;
    margin-bottom: 0;
}

.address-text,
.hours-text {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 400;
}

.address-text {
    font-size: 14px;
    font-weight: 500;
}

.hours-text:last-child {
    margin-bottom: 0;
}

/* Dropdown arrow animation */
.phone-dropdown-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .phone-dropdown-menu {
        right: -8px;
        left: -8px;
        min-width: auto;
        max-width: none;
        border-radius: 8px;
        margin-top: 6px;
    }

    .phone-dropdown-content {
        padding: 8px;
    }

    .phone-section {
        padding: 10px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    .phone-section-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .phone-call-button {
        font-size: 13px;
        padding: 5px 10px;
        border-radius: 5px;
    }

    .phone-label {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .phone-link {
        font-size: 13px;
        padding: 6px;
        border-radius: 5px;
    }

    .phone-number-link {
        font-size: 13px;
        padding: 2px 4px;
    }

    .operator-icon {
        height: 12px;
        width: 12px;
        object-fit: contain;
        margin-right: 3px;
        display: none;
    }

    .address-text,
    .hours-text {
        font-size: 12px;
    }

    .address-text {
        font-size: 13px;
    }

    .contact-info-row {
        flex-direction: column;
        gap: 8px;
    }

    /* Mobile status indicator */
    .status-indicator {
        width: 8px;
        height: 8px;
        top: 5px;
        right: 5px;
        border-width: 1px;
    }

    .status-indicator[data-status="open"] {
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
        animation: pulse-green-mobile 2s infinite;
    }

    .status-indicator[data-status="closed"] {
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    }

    .status-indicator[data-status="checking"] {
        box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    }

    @keyframes pulse-green-mobile {
        0% {
            box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
        }
        70% {
            box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
        }
    }

    /* Mobile connecting element */
    .phone-dropdown-item.active::after {
        right: 15px;
        height: 6px;
    }

    /* Mobile hover bridge */
    .hover-bridge {
        display: none; /* Disable on mobile for touch devices */
    }

    /* Larger text for manager contacts on mobile */
    .phone-section:nth-child(2) .phone-link .phone-label {
        font-size: 15px;
        font-weight: 700;
    }

    .phone-section:nth-child(2) .phone-link .phone-number {
        font-size: 15px;
        font-weight: 600;
    }

    /* Larger text for Лук"янівська section on mobile */
    .phone-link.highlight .phone-label {
        font-size: 15px;
        font-weight: 700;
    }

    .phone-link.highlight .phone-number-link {
        font-size: 15px;
        font-weight: 600;
    }
}

/* Ensure dropdown appears above other elements */
.header-info-list {
    position: relative;
    z-index: 100;
}

/* Add pointer cursor to info text */
.phone-dropdown-trigger .info-text {
    cursor: pointer;
}

/* Temporarily hide login link list item */
.info-item.header-login-link {
    display: none !important;
}
