﻿/* Module_RDN.html */

    /* 1. DEFINE GENTLE GLOW ANIMATION (For all themes) - УСИЛЕННЫЙ КОНТУР И РАДИУС */
    @keyframes subtleGlow {
        0%   { color: #4f46e5; border-color: #cbd5e1; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff; }
        50%  { color: #6366f1; border-color: #818cf8; box-shadow: 0 0 16px 3px rgba(99, 102, 241, 0.55), inset 0 1px 0 #ffffff; } /* Контур шире и плотнее */
        100% { color: #4f46e5; border-color: #cbd5e1; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff; }
    }

    @keyframes subtleGlowDark {
        0%   { color: #a5b4fc; border-color: #475569; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
        50%  { color: #c7d2fe; border-color: #818cf8; box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2); } /* Максимальный неоновый импульс */
        100% { color: #a5b4fc; border-color: #475569; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
    }

    /* Scrollbar Settings */
    #rdn-scroll-area::-webkit-scrollbar { width: 7px !important; height: 7px !important; }
    #rdn-scroll-area::-webkit-scrollbar-track { background: transparent; }
    #rdn-scroll-area::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.25); border-radius: 10px; }
    #rdn-scroll-area::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

    /* RDN Table */
    #rdn-table-main { table-layout: auto !important; min-width: 100%; }
    
    /* Cell Grid */
    #rdn-table-main th, #rdn-table-main td { 
        padding: 7px 6px !important; 
        font-size: 11px !important; 
        white-space: nowrap;
        border-bottom: 1px solid #e2e8f0 !important; 
        border-right: 1px solid #f1f5f9 !important;  
    }
    .dark #rdn-table-main th, .dark #rdn-table-main td {
        border-bottom: 1px solid #334155 !important; 
        border-right: 1px solid rgba(51, 65, 85, 0.5) !important;
    }

    /* Text Colors */
    #rdn-table-main td, #rdn-table-main th { color: #000000 !important; }
    .dark #rdn-table-main td, 
    .dark #rdn-table-main th, 
    .dark #rdn-table-main span { color: #ffffff !important; }

    #rdn-table-main .col-date-fixed { width: 82px !important; min-width: 82px !important; max-width: 82px !important; }

    /* TABLE HEADER (Light theme) */
    #thead-rdn th {
        background-color: #f1f5f9 !important; /* Soft slate-100 */
        opacity: 1 !important;
        border-bottom: 2px solid #cbd5e1 !important; 
        border-right: 1px solid #e2e8f0 !important;
        position: sticky;
        top: 0;
        z-index: 110;
    }
    .dark #thead-rdn th {
        background-color: #1e293b !important; 
        border-bottom: 2px solid #475569 !important; 
        border-right: 1px solid #334155 !important;
    }

    /* STICKY DATE COLUMN */
    #rdn-table-main .sticky-col {
        position: sticky;
        left: 0;
        z-index: 20;
        background-color: #f1f5f9 !important; /* Matches header tone */
        border-right: 1px solid #cbd5e1 !important; 
        box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.15) !important; 
        font-weight: 700;
    }
    .dark #rdn-table-main .sticky-col { 
        background-color: #1e293b !important; 
        border-right: 1px solid #334155 !important;
        box-shadow: 4px 0 10px -3px rgba(0, 0, 0, 0.5) !important;
    }

    /* CORNER CELL "DATE" */
    #rdn-table-main .sticky-corner {
        position: sticky;
        top: 0;
        left: 0;
        z-index: 120 !important;
        background-color: #e2e8f0 !important; /* One tone deeper to fix the corner */
        border-right: 1px solid #cbd5e1 !important;
        border-bottom: 2px solid #cbd5e1 !important;
        box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.15) !important;
    }
    .dark #rdn-table-main .sticky-corner { 
        background-color: #334155 !important; 
        border-right: 1px solid #475569 !important;
        border-bottom: 2px solid #475569 !important;
        box-shadow: 4px 0 10px -3px rgba(0, 0, 0, 0.5) !important;
    }

    /* VOLUME TOGGLE BUTTON WITH GENTLE GLOW EFFECT */
    #rdn-table-main .toggle-pill {
        width: 100% !important;
        height: 100% !important;
        padding: 4px 8px !important;
        font-size: 10px !important;
        font-weight: 900 !important;
        letter-spacing: 0.05em !important;
        border-radius: 0.5rem !important;
        cursor: pointer !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        
        /* Volume Effect (Common) */
        border-width: 1px !important;
        border-style: solid !important;
    }

    /* Light Theme Settings & Animation */
    #rdn-table-main .toggle-pill {
        background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important; 
        /* 2s slow pulsing glow loop */
        animation: subtleGlow 2s infinite ease-in-out !important; 
    }
    #rdn-table-main .toggle-pill:hover {
        animation: none !important; /* Stop glowing on hover */
        border-color: #6366f1 !important;
        background: #6366f1 !important; 
        color: #ffffff !important; 
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    }

    /* Dark Theme Settings & Animation */
    .dark #rdn-table-main .toggle-pill {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important; 
        /* Slightly slower dark theme glow for mood */
        animation: subtleGlowDark 3s infinite ease-in-out !important; 
    }
    .dark #rdn-table-main .toggle-pill:hover {
        animation: none !important; /* Stop glowing on hover */
        border-color: #818cf8 !important;
        background: #6366f1 !important; 
        color: #ffffff !important;
        box-shadow: 0 0 14px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    }

    /* Active State (Button Press) - both themes */
    #rdn-table-main .toggle-pill:active {
        transform: scale(0.95) !important; /* Tactile click effect */
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        animation: none !important;
    }

    #rdn-table-main .month-row-sep {
        background: rgba(99, 102, 241, 0.1) !important;
        font-weight: 900;
        text-align: center;
        text-transform: uppercase;
        border-bottom: 2px solid rgba(99, 102, 241, 0.3) !important;
    }
    .dark #rdn-table-main .month-row-sep { background: rgba(99, 102, 241, 0.2) !important; }

    #rdn-table-main .today-text { color: #ef4444 !important; font-weight: 900; }
    .dark #rdn-table-main .today-text { color: #ff5555 !important; }

    #rdn-table-main .font-data-bold { font-weight: 700 !important; }