/* Trigger Button */
.visa-trigger-wrapper {
    display: inline-block;
}

/* Popup */
.popup-container {
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.popup-container:not(.hidden) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Content */
.popup-content {
    max-height: 90vh;
    width: 100%;
    margin: auto;
    background: white;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.popup-container:not(.hidden) .popup-content {
    transform: scale(1);
    opacity: 1;
}

/* Header */
.popup-header {
    transition: background-color 0.3s ease;
}

/* Accordion */
.accordion-content {
    display: none;
    transition: height 0.3s ease;
}

.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f8fafc;
}

.accordion-header svg {
    transition: transform 0.3s ease;
}

.accordion-header svg.rotate-180 {
    transform: rotate(180deg);
}

/* Tabs */
.tab {
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.tab.active {
    color: #006C9C;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 2px;
    background-color: #006C9C;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scaleX(1);
}

.tab:not(.active)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 2px;
    background-color: #006C9C;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scaleX(0);
}

.tab:hover::after {
    transform: scaleX(1);
    opacity: 0.5;
}

/* Tab content */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content:not(.hidden) {
    display: block;
    opacity: 1;
}

/* RTL Support */
[dir="rtl"] .accordion-header svg {
    transform: scaleX(-1);
}

[dir="rtl"] .accordion-header svg.rotate-180 {
    transform: scaleX(-1) rotate(180deg);
}

/* Focus States */
.close-popup:focus,
.accordion-header:focus,
.tab:focus {
    outline: 2px solid #006C9C;
    outline-offset: 2px;
}

/* Hover States */
.tab:hover {
    color: #006C9C;
}

/* Color Classes */
.text-saudi-green {
    color: #006C9C !important;
}

.border-saudi-green {
    border-color: #006C9C !important;
}

/* Mobile */
@media (max-width: 640px) {
    .popup-content {
        width: 95%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* Content Styles */
.tab-content ul {
    list-style-type: disc;
    padding-right: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.tab-content li {
    margin-bottom: 0.5rem;
}

/* Country Flag */
.country-flag {
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.country-flag:hover {
    transform: scale(1.1);
}

/* Visa Price Tag */
.bg-saudi-green {
    background-color: #006C9C;
    transition: all 0.3s ease;
}

.accordion-header:hover .bg-saudi-green {
    background-color: #005a80;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 108, 156, 0.2);
}

@media (max-width: 640px) {
    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .accordion-header .flex {
        width: 100%;
        justify-content: space-between;
    }
}

/* Close Button */
.close-popup {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.close-popup:hover {
    opacity: 0.8;
    transform: scale(1.1);
}


