/* ============================================
   PREMIUM MODAL & POPUP SYSTEM
   NOTE: Base modal styles moved to app.ui-consistency.css
   This file contains premium-specific overrides only
   ============================================ */

/* Responsive sizes - REMOVED: Now handled by app.ui-consistency.css unified system */
/* All modals use the unified width system:
   - Default: 800px
   - modal-sm: 600px  
   - modal-lg: 1000px
   - modal-xl: 1200px
*/

/* ==============================================
   MODAL HEADER WITH ICON BADGE
   ============================================== */

.modal-header-premium {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.modal-icon-badge {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%);
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3);
}

.modal-header-title {
    flex: 1;
}

.modal-header-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.modal-header-title p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0;
}

.modal-close-btn-premium {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 0.5rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.modal-close-btn-premium:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
    color: var(--text-dark);
}

.modal-close-btn-premium:active {
    transform: scale(0.95);
}

/* ==============================================
   MODAL BODY - MAIN CONTENT
   ============================================== */

.modal-body-premium {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Scrollbar styling */
.modal-body-premium::-webkit-scrollbar {
    width: 6px;
}

.modal-body-premium::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body-premium::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.modal-body-premium::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Form groups in modals */
.modal-form-group {
    margin-bottom: 1.25rem;
}

.modal-form-group:last-child {
    margin-bottom: 0;
}

.modal-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-form-label.required::after {
    content: ' *';
    color: #dc2626;
}

.modal-form-input,
.modal-form-select,
.modal-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.modal-form-input:focus,
.modal-form-select:focus,
.modal-form-textarea:focus {
    outline: none;
    border-color: #FFA94D;
    box-shadow: 0 0 0 3px rgba(255, 169, 77, 0.1);
}

.modal-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form hints */
.modal-form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.4rem;
}

/* ==============================================
   MODAL FOOTER - ACTIONS
   ============================================== */

.modal-footer-premium {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: var(--bg-hover);
    flex-shrink: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Button styling in modals */
.modal-btn {
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3);
}

.modal-btn-primary:hover {
    box-shadow: 0 6px 16px rgba(255, 169, 77, 0.4);
    transform: translateY(-1px);
}

.modal-btn-primary:active {
    transform: translateY(0);
}

.modal-btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.modal-btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
}

.modal-btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.modal-btn-danger:hover {
    background: #fecaca;
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==============================================
   MODAL DIVIDER
   ============================================== */

.modal-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1rem 0;
}

/* ==============================================
   MODAL INFO BOX
   ============================================== */

.modal-info-box {
    background: #fff9f0;
    border: 1px solid #fde08a;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    gap: 0.75rem;
}

.modal-info-box .icon {
    font-size: 1.25rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.modal-info-box .content {
    font-size: 0.875rem;
    color: #92400e;
}

.modal-info-box.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.modal-info-box.success .icon {
    color: #10b981;
}

.modal-info-box.success .content {
    color: #065f46;
}

.modal-info-box.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.modal-info-box.error .icon {
    color: #dc2626;
}

.modal-info-box.error .content {
    color: #7f1d1d;
}

/* ==============================================
   ENHANCED SECTION BUTTONS
   ============================================== */

.section-header-primary {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

.section-header-title {
    flex: 1;
    min-width: 200px;
}

.section-header-title h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.section-header-title p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.section-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-primary-premium,
.holded-button-primary.btn-primary-premium {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%) !important;
    color: #333 !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.btn-primary-premium:hover,
.holded-button-primary.btn-primary-premium:hover {
    box-shadow: 0 6px 16px rgba(255, 169, 77, 0.4) !important;
    transform: translateY(-2px) !important;
}

.btn-primary-premium:active,
.holded-button-primary.btn-primary-premium:active {
    transform: translateY(0) !important;
}

.btn-secondary-premium,
.holded-button-secondary.btn-secondary-premium {
    background: white !important;
    color: #333 !important;
    padding: 0.75rem 1.5rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--radius-lg) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-secondary-premium:hover,
.holded-button-secondary.btn-secondary-premium:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
}

/* ==============================================
   FILTER TOOLBAR
   ============================================== */

.filter-toolbar {
    background: white !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 0.75rem !important;
    padding: 1.25rem !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
}

/* Ensure hidden filter-toolbar is completely hidden */
.filter-toolbar.hidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 160px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: 0.65rem 0.75rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--radius-lg) !important;
    font-size: 0.9rem !important;
    background: white !important;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #FFA94D;
    box-shadow: 0 0 0 3px rgba(255, 169, 77, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.filter-btn-apply {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%) !important;
    color: #333 !important;
    padding: 0.65rem 1.25rem !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.filter-btn-apply:hover {
    transform: translateY(-1px) !important;
}

.filter-btn-reset {
    background: #f5f5f5 !important;
    color: #666 !important;
    padding: 0.65rem 1.25rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--radius-lg) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.filter-btn-reset:hover {
    background: #f0f0f0 !important;
}

/* ==============================================
   ENHANCED CARDS & LISTS
   ============================================== */

.card-premium {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.card-premium:hover {
    border-color: #FFA94D;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.15);
}

.card-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.card-title-premium {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: #fff9f0;
    color: #9a4d00;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-badge.active {
    background: #ecfdf5;
    color: #047857;
}

.card-badge.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* ==============================================
   EMPTY STATE PREMIUM
   ============================================== */

.empty-state-premium {
    text-align: center !important;
    padding: 3rem 1.5rem !important;
    color: #666 !important;
}

.empty-state-icon {
    font-size: 3.5rem !important;
    background: linear-gradient(135deg, rgba(255, 169, 77, 0.1) 0%, rgba(255, 169, 77, 0.1) 100%) !important;
    color: #FFA94D !important;
    width: 5rem !important;
    height: 5rem !important;
    margin: 0 auto 1.5rem !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #999;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.empty-state-action {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%) !important;
    color: #333 !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.empty-state-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3) !important;
}

/* ==============================================
   LOADING & SKELETON
   ============================================== */

.skeleton-premium {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoad 2s infinite;
}

@keyframes skeletonLoad {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */

@media (max-width: 640px) {
    .modal-footer-premium {
        flex-direction: column-reverse;
    }

    .modal-btn {
        width: 100%;
        justify-content: center;
    }

    .section-header-primary {
        flex-direction: column;
    }

    .section-header-actions {
        width: 100%;
    }

    .filter-toolbar {
        flex-direction: column;
    }

    .filter-actions {
        width: 100%;
        margin-left: 0;
    }

    .filter-btn-apply,
    .filter-btn-reset {
        flex: 1;
    }
}

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.modal-shake {
    animation: shake 0.3s ease-in-out;
}