/**
 * Commission Structure Page - Ultra Dark Mode Edition
 * 
 * Complete styling for the commission structure page.
 * Consistent with legal pages but with commission-specific components.
 */

/* ============================================
   Page Layout
   ============================================ */
.commission-structure-page {
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 4rem;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .commission-structure-page {
    background: #0a0f1a;
}

.commission-structure-page__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ============================================
   Hero Section
   ============================================ */
.commission-structure-hero {
    padding: clamp(3rem, 6vw, 5rem) 0 3rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 3rem;
    background: #ffffff !important;
}

[data-theme="dark"] .commission-structure-hero {
    background: #0a0f1a !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.commission-structure-hero__title {
    font-family: var(--font-family-heading, 'Playfair Display', serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #1a1d20;
    margin: 0 0 1rem;
    line-height: 1.1;
}

[data-theme="dark"] .commission-structure-hero__title {
    color: #f1f5f9;
}

.commission-structure-hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

[data-theme="dark"] .commission-structure-hero__subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Stats Grid */
.commission-structure-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.commission-structure-hero__stat {
    background: #f8f9fa !important;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

[data-theme="dark"] .commission-structure-hero__stat {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08);
}

.commission-structure-hero__stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .commission-structure-hero__stat:hover {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.commission-structure-hero__stat-value {
    font-family: var(--font-family-heading, 'Playfair Display', serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: #0c2340;
    margin-bottom: 0.5rem;
    line-height: 1;
}

[data-theme="dark"] .commission-structure-hero__stat-value {
    color: #d4af37;
}

.commission-structure-hero__stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

[data-theme="dark"] .commission-structure-hero__stat-label {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Section Styling
   ============================================ */
.commission-structure-section {
    margin-bottom: 4rem;
    padding: 3rem 0;
    background: transparent;
}

.commission-structure-section:nth-child(even) {
    background: #f8f9fa;
    border-radius: 24px;
    padding: 3rem 2rem;
}

[data-theme="dark"] .commission-structure-section:nth-child(even) {
    background: rgba(15, 23, 42, 0.4);
}

.commission-structure-section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.commission-structure-section__title {
    font-family: var(--font-family-heading, 'Playfair Display', serif);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #1a1d20;
    margin: 0 0 1rem;
    line-height: 1.2;
}

[data-theme="dark"] .commission-structure-section__title {
    color: #f1f5f9;
}

.commission-structure-section__subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

[data-theme="dark"] .commission-structure-section__subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Referral Types Grid
   ============================================ */
.referral-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.referral-type-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .referral-type-card {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.referral-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0c2340, #d4af37);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.referral-type-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .referral-type-card:hover {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.referral-type-card:hover::before {
    opacity: 1;
}

.referral-type-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, rgba(12, 35, 64, 0.05) 0%, rgba(212, 175, 55, 0.1) 100%);
    color: #0c2340;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

[data-theme="dark"] .referral-type-card__icon {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    color: #d4af37;
}

.referral-type-card:hover .referral-type-card__icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #0c2340 0%, #1a3a5a 100%);
    color: #d4af37;
}

.referral-type-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1d20;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

[data-theme="dark"] .referral-type-card__title {
    color: #f1f5f9;
}

.referral-type-card__description {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    flex-grow: 1;
}

[data-theme="dark"] .referral-type-card__description {
    color: rgba(255, 255, 255, 0.6);
}

.referral-type-card__details {
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem;
    background: rgba(12, 35, 64, 0.03);
    border-radius: 12px;
}

[data-theme="dark"] .referral-type-card__details {
    background: rgba(255, 255, 255, 0.03);
}

.referral-type-card__rate {
    font-family: var(--font-family-heading, 'Playfair Display', serif);
    font-size: 2rem;
    font-weight: 700;
    color: #0c2340;
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .referral-type-card__rate {
    color: #d4af37;
}

.referral-type-card__rate-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="dark"] .referral-type-card__rate-label {
    color: rgba(255, 255, 255, 0.5);
}

.referral-type-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.referral-type-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(12, 35, 64, 0.05);
    color: #0c2340;
}

[data-theme="dark"] .referral-type-card__badge {
    background: rgba(255, 255, 255, 0.05);
    color: #d4af37;
}

.referral-type-card__badge--requires-approval {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

[data-theme="dark"] .referral-type-card__badge--requires-approval {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.referral-type-card__badge--recurring {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

[data-theme="dark"] .referral-type-card__badge--recurring {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.referral-type-card__benefits {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .referral-type-card__benefits {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.referral-type-card__benefits h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1d20;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="dark"] .referral-type-card__benefits h4 {
    color: #f1f5f9;
}

.referral-type-card__benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referral-type-card__benefits li {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

[data-theme="dark"] .referral-type-card__benefits li {
    color: rgba(255, 255, 255, 0.6);
}

.referral-type-card__benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: 700;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .commission-structure-hero__stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .referral-types-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
