/* ==========================================================================
   HIGH-CONTRAST EXTENDED STYLE SHEET (SC JÚ Praha)
   Verze: 3.9 (Červen 2026)
   Popis: Sjednocený styl pro Řídicí centrum, modální okna a formuláře.
          OPRAVENO: Fixní plovoucí pozice přihlašovacího tlačítka vlevo dole.
   ========================================================================== */

/* ==========================================================================
   1. MODÁLNÍ OKNO (Ztmavení pozadí a hlavní kontejner)
   ========================================================================== */

/* Styl pro překrytí pozadí (Ztmavení stránky) */
.sp-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hlavní kontejner okna - ROZŠÍŘENO PRO LEPŠÍ PŘEHLEDNOST */
.sp-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border: 4px solid #687d40;
    border-radius: 12px;
    max-width: 800px; /* Širší zobrazení, aby formulář nebyl mačkaný */
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    font-family: system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

/* Hlavička okna */
.sp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.sp-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a2c00;
}

.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.sp-modal-close:hover {
    color: #000;
}


/* ==========================================================================
   2. INTERNÍ SEKCE PRO TRENÉRA (Rozčlenění polí do řádku)
   ========================================================================== */

/* Šedý box, který vizuálně odděluje interní data */
.sp-interni-sekce-trenera {
    background: #f4f7f9;
    padding: 20px;
    border-left: 4px solid #687d40;
    margin: 20px 0;
    border-radius: 6px;
}

.sp-sekce-info-text {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #333;
}

/* Flexibilní řádek pro umístění 3 polí vedle sebe */
.sp-flex-row {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Sloupec pro každé z nových tří polí (každé zabere cca třetinu) */
.sp-col-33 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Specifický styl pro nová input pole (včetně kalendářů) */
.sp-interni-sekce-trenera input[type="date"],
.sp-interni-sekce-trenera input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    background: #ffffff;
    height: 42px;
}


/* ==========================================================================
   3. FORMULÁŘOVÉ PRVKY A KLASICKÁ POLE
   ========================================================================== */

.sp-form-group {
    margin-bottom: 15px;
}

.sp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.sp-form-group input[type="text"],
.sp-form-group input[type="password"],
.sp-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* Základní vizuální oddělení uzamčených polí */
.sp-locked-field input {
    background-color: #eaeaea !important;
    color: #666 !important;
    cursor: not-allowed;
    border: 1px solid #ccc;
}


/* ==========================================================================
   4. TLAČÍTKA A AKCE
   ========================================================================== */

.sp-form-actions button,
.sp-edit-profile-trigger,
.sc-btn-primary {
    background-color: #687d40;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.sp-form-actions button:hover,
.sp-edit-profile-trigger:hover,
.sc-btn-primary:hover {
    background-color: #1a2c00;
}

.sp-btn-secondary {
    background-color: #767676 !important;
    margin-left: 10px;
}


/* ==========================================================================
   4a. PLOVOUCÍ PŘIHLAŠOVACÍ TLAČÍTKO (Fixováno vlevo dole - KOMPAKTNÍ VERZE)
   ========================================================================== */
/* Hlavní obalový bílý kontejner pro dvě tlačítka */
.sp-floating-buttons-cluster {
    position: fixed !important;
    bottom: 12px !important; /* Posunuto níže k okraji obrazovky */
    left: 15px !important;
    z-index: 999999 !important;
    display: flex !important;
    gap: 8px !important; /* Menší mezera mezi tlačítky */
    align-items: center !important;
    flex-wrap: nowrap !important;
    
    background: #ffffff !important; 
    padding: 4px 8px !important; /* Zmenšen vnitřní prostor */
    border-radius: 50px !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important; /* Jemnější stín */
    border: 1px solid #eaeaea !important;
}

/* Vnitřní styl pro obě tlačítka - MENŠÍ ROZMĚRY */
.sp-floating-buttons-cluster button,
.sp-floating-buttons-cluster a {
    box-shadow: none !important;
    margin: 0 !important;
    height: 32px !important; /* Výrazně snížená výška (původně 42px) */
    padding: 0 14px !important; /* Užší tlačítka */
    font-size: 13px !important; /* Menší, čistší písmo (původně 15px) */
    font-weight: bold !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Samostatné plovoucí tlačítko pro odhlášeného uživatele (🔒 Vstoupit do profilu) */
body > .sp-login-trigger-btn,
main + .sp-login-trigger-btn,
div + .sp-login-trigger-btn,
.sp-floating-fixed-btn {
    position: fixed !important;
    bottom: 12px !important;
    left: 15px !important;
    z-index: 999999 !important;
    
    background-color: #687d40 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 16px !important;
    height: 34px !important; /* Kompaktní výška pro odhlášený stav */
    font-size: 13px !important;
    font-weight: bold !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: background-color 0.2s, transform 0.15s ease !important;
}

/* ==========================================================================
   5. SYSTÉMOVÉ ODEZVY A DASHBOARD
   ========================================================================== */

/* Chybové a úspěšné hlášky přihlášení */
.sp-login-feedback {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}
.sp-login-feedback.error { background-color: #ffe6e6; color: #cc0000; border: 1px solid #cc0000; }
.sp-login-feedback.success { background-color: #e6ffe6; color: #006600; border: 1px solid #006600; }

/* Frontendové řídicí centrum rozvržení */
.sc-dashboard-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: system-ui, -apple-system, sans-serif;
}

.sc-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.sc-card {
    background: #ffffff;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sc-card-title {
    font-size: 1.6rem;
    color: #005221;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 3px solid #007a33;
    padding-bottom: 8px;
}

/* Stavy docházky u akcí */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}
.status-potvrzeno { background-color: #e6f4ea; color: #137333; }
.status-omluven { background-color: #fce8e6; color: #c5221f; }
.status-ceka { background-color: #ffe0b2; color: #e65100; }

/* Průvodce a kroky v návodu */
.sc-guide-step {
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #ffb81c;
}

/* Správa hlavních formulářů pro vkládání událostí */
.sc-form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #cccccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Globální webové alerty a oznámení */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
}
.alert-success { background: #e6f4ea; color: #137333; border: 1px solid #137333; }
.alert-danger { background: #fce8e6; color: #c5221f; border: 1px solid #c5221f; }


/* ==========================================================================
   6. RESPONSIVITA (Mobilní zařízení)
   ========================================================================== */

/* Zalamování hlavního gridu na tabletech a mobilech */
@media (max-width: 992px) {
    .sc-grid-layout { grid-template-columns: 1fr; }
}

/* Na telefonech seřadí 3 pole v interní sekci pod sebe */
@media (max-width: 600px) {
    .sp-flex-row {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Mírné posunutí tlačítka na malých mobilech, aby nepřekáželo textu */
    .sp-login-trigger-btn {
        bottom: 15px !important;
        left: 15px !important;
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }
}
