/* Export Variant Dropdown Styling */
.export-variant-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    margin-top: 0.25rem;
    min-width: 20rem;
    max-width: 24rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform-origin: top right;
    transition: all 0.15s ease-out;
}

.dropdown-content.hidden {
    display: none;
}

.dropdown-content.opacity-0 {
    opacity: 0;
}

.dropdown-content.opacity-100 {
    opacity: 1;
}

.dropdown-content.scale-95 {
    transform: scale(0.95);
}

.dropdown-content.scale-100 {
    transform: scale(1);
}

/* Eye button styling */
.export-variant-eye-button {
    transition: all 0.2s ease-in-out;
    border-radius: 50%;
}

.export-variant-eye-button:hover {
    background-color: #f3f4f6;
}

.export-variant-eye-button.active {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Selected items counter */
.selected-counter {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Checkbox list styling */
.checkbox-list {
    max-height: 16rem;
    overflow-y: auto;
}

.checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dropdown header actions */
.dropdown-actions {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-actions button {
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-actions button:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* Format badges */
.format-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.format-badge.pdf {
    background-color: #fef2f2;
    color: #dc2626;
}

.format-badge.epub {
    background-color: #f0fdf4;
    color: #16a34a;
}

/* Animation classes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-0.5rem) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-0.5rem) scale(0.95);
    }
}

.dropdown-enter {
    animation: slideIn 0.15s ease-out forwards;
}

.dropdown-exit {
    animation: slideOut 0.15s ease-in forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .dropdown-content {
        left: 0;
        right: 0;
        min-width: auto;
        max-width: none;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* Focus states */
.checkbox-list input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #dbeafe;
    border-color: #2563eb;
}

.export-variant-eye-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #dbeafe;
}

/* Disabled state */
.export-variant-dropdown.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Loading state */
.export-variant-dropdown.loading .export-variant-eye-button {
    opacity: 0.7;
}

.export-variant-dropdown.loading .export-variant-eye-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}