/* Quick Add to Library Component Styles */

.quick-add-btn {
    position: relative;
    top: 24px;
    right: 12px;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quick-add-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.quick-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-add-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.quick-add-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: quickAddSlideIn 0.3s ease-out;
}

/* Dark Theme Support */
.theme-indigo-dark .quick-add-content {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

@keyframes quickAddSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-add-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.theme-indigo-dark .quick-add-header {
    border-bottom: 2px solid rgba(51, 65, 85, 0.8);
}

.quick-add-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.quick-add-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 1.2rem;
}

.quick-add-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quick-add-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.theme-indigo-dark .quick-add-body {
    background: #1e293b;
}

.quick-add-item-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.theme-indigo-dark .quick-add-item-info {
    background: rgba(15, 23, 42, 0.8);
    border-left: 4px solid #6366f1;
}

.item-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.theme-indigo-dark .item-name {
    color: #f1f5f9;
}

.item-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    cursor: help;
    position: relative;
}

.theme-indigo-dark .item-description {
    color: #94a3b8;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.theme-indigo-dark .form-group label {
    color: #cbd5e1;
}

.form-select {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.theme-indigo-dark .form-select {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.8);
    color: #f1f5f9;
}

.theme-indigo-dark .form-select option {
    background: #0f172a;
    color: #f1f5f9;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.theme-indigo-dark .form-select:focus {
    border-color: #6366f1;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.form-select[multiple] {
    min-height: 120px;
    padding: 0.5rem;
}

.form-select[multiple] option {
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 4px;
}

.form-select[multiple] option:hover {
    background: #667eea;
    color: white;
}

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
}

.theme-indigo-dark .form-text {
    color: #94a3b8;
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-select.is-invalid {
    border-color: #dc3545;
}

.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Select2 Customization */
.select2-container--default .select2-selection--multiple {
    border-radius: 10px !important;
    border: 1px solid #dee2e6 !important;
    min-height: 50px !important;
    padding: 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #667eea !important;
    border: none !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    margin: 3px !important;
    font-size: 0.95rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white !important;
    margin-right: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff6b6b !important;
}

.select2-dropdown {
    border-radius: 10px !important;
    border: 1px solid #dee2e6 !important;
}

/* Status Color Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.quick-add-footer {
    padding: 1.25rem 2rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #f8f9fa;
}

.theme-indigo-dark .quick-add-footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 2px solid rgba(51, 65, 85, 0.8);
}

/* Override quick-add.css styles when inside dropdown */
.add-dropdown-menu .quick-add-btn {
    position: static ;
    top: auto ;
    right: auto ;
    transform: none ;
    box-shadow: none ;
}

.add-dropdown-menu .quick-add-btn:hover {
    transform: none ;
    box-shadow: none ;
}

/* Responsive */
@media (max-width: 768px) {
    /* Quick Add button in TOP100 context - move to bottom */
    .quick-add-btn {
        position: static !important;
        transform: none !important;
        width: 100%;
        /* display: flex !important; */
        justify-content: center;
        margin: 0;
        top: auto !important;
        right: auto !important;
    }
    
    .quick-add-btn:hover {
        transform: scale(1.05) !important;
    }

    
}

@media (max-width: 576px) {
    .quick-add-content {
        width: 95%;
        max-height: 95vh;
    }

    .quick-add-header,
    .quick-add-body,
    .quick-add-footer {
        padding: 1rem 1.5rem;
    }

    .quick-add-title {
        font-size: 1.1rem;
    }

    .quick-add-footer {
        flex-direction: column;
    }

    .quick-add-footer .btn-site {
        width: 100%;
    }
}
