/**
 * Portal Premium Effects
 * 
 * Global gradient background and premium UI effects
 * 
 * @package RivaClientPortal
 * @version 1.4.2
 */

/* Global Gradient Background - Single Layer on Body */
body.rcp-portal-page::before,
body.riva-portal-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, #1a1f3a, #0e364f, #2d6a4f, #7b2cbf);
    background-size: 400% 400%;
    animation: gradientShift var(--gradient-animation-duration, 18s) ease infinite;
    z-index: -1;
    pointer-events: none;
    will-change: background-position;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Legacy support */
@keyframes rcpGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Card Backgrounds - ONLY Cards Get Glass Effect */
.rcp-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

.rcp-main__content,
.rcp-analytics-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
}

/* Container & Content - Absolutely NO Visual Effects */
.rcp-container,
.rcp-content,
div.rcp-container,
.rcp-content > .rcp-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Remove black backgrounds and container borders - FIX COLOR INCONSISTENCIES */
.rcp-content,
.rcp-main,
.rcp-main__content,
.rcp-requests-grid,
.rcp-page-header,
.rcp-content > .rcp-container,
div.rcp-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Ensure all cards are glass */
.rcp-card__head,
.rcp-card__body,
.rcp-form-section,
.rcp-setting-item {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Z-Index Hierarchy - Final & Consistent */
.rcp-header { 
    z-index: 1100 !important; 
    background: transparent !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rcp-sidebar { 
    z-index: 9999 !important; /* CRITICAL: Sidebar overlay'ın üstünde olmalı */
}

.rcp-notifications__dropdown,
.rcp-user-menu__dropdown,
.rcp-dropdown { 
    z-index: 1000 !important; /* DÜŞÜRÜLDÜ */ 
}

.rcp-modal {
    z-index: 10000 !important;
}

.rcp-main { 
    z-index: 1; 
}

.rcp-content { 
    z-index: 1; 
}

/* Status Badges */
.rcp-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.rcp-status--pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.rcp-status--approved {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.rcp-status--rejected {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Button Loading State */
.rcp-btn__icon {
    display: inline-block;
    margin-right: 4px;
}

.rcp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table Enhancements */
.rcp-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.rcp-table th,
.rcp-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rcp-table th {
    background: rgba(0, 0, 0, 0.4);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.rcp-table td {
    color: rgba(255, 255, 255, 0.8);
}

.rcp-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Form Enhancements */
.rcp-form {
    display: grid;
    gap: 16px;
}

.rcp-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.rcp-form__col {
    display: flex;
    flex-direction: column;
}

.rcp-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.rcp-input,
.rcp-textarea,
.rcp-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rcp-input:focus,
.rcp-textarea:focus,
.rcp-select:focus {
    outline: none;
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

.rcp-input::placeholder,
.rcp-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Button Styles */
.rcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rcp-btn--primary {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
}

.rcp-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.5);
}

.rcp-btn--success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.rcp-btn--danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.rcp-btn--sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rcp-form__row {
        grid-template-columns: 1fr;
    }
    
    .rcp-table {
        font-size: 12px;
    }
    
    .rcp-table th,
    .rcp-table td {
        padding: 8px 12px;
    }
}

/* ========================================
   PHASE 2: Single Global Gradient
   ======================================== */

.riva-portal-page .rcp-gradient-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, #0b2233, #0f3a4f, #234f5a, #3a2a5e);
    background-size: 400% 400%;
    animation: rcpGradient 18s ease infinite;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

/* Body reset - no background conflicts */
body.riva-portal-page {
    background: transparent !important;
}