
/* =========================================
   RIVERLUX PREMIUM MODALS (INJECTED)
   ========================================= */

/* Overlay - tamna pozadina (blur isključen za performance) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7); /* Tamnija pozadina bez blur-a */
    /* backdrop-filter: blur(12px); - ISKLJUČENO - pravi lag */
    /* -webkit-backdrop-filter: blur(12px); */
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 1; /* Bez fade animacije */
    /* transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); - ISKLJUČENO */
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Card */
.modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 24px; /* Veći radius */
    box-shadow: 
        0 20px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset; /* Unutrašnji border */
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

/* Header sa gradijentom */
.modal-header-modern {
    padding: 24px 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title-box h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.modal-badge {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.badge-paid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-unpaid { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Body content */
.modal-body-modern {
    padding: 28px;
    background: #fff;
}

/* Date Grid */
.date-display-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.date-box {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.date-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.date-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.date-arrow {
    color: #cbd5e1;
    font-size: 20px;
    display: flex;
    justify-content: center;
}

/* Info Grid */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
}

/* Resize Controls (+ / -) */
.resize-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.resize-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #334155;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.resize-btn:hover {
    background: #e2e8f0;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.resize-btn:active {
    transform: scale(0.95);
}

.resize-value {
    font-size: 32px;
    font-weight: 800;
    color: #3b82f6;
    min-width: 60px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Footer Actions */
.modal-footer-modern {
    padding: 20px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
}

.btn-modern {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-modern.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-modern.primary:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.btn-modern.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

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

.btn-modern.secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.btn-modern.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: #e2e8f0;
    color: #ef4444;
    transform: rotate(90deg);
}
