/* =========================================================
   Theme: Liquid Glass
   Activated by: <body class="theme-glass">
   Philosophy: page and inputs stay clean/readable;
   glass treatment applied to buttons, cards, panels,
   modals, and interactive accents only.
   ========================================================= */

/* ----- Toggle button (both themes) ----- */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: rgba(201, 168, 76, 0.1);
}

body.theme-glass .theme-toggle-btn {
    background: rgba(201, 168, 76, 0.15);
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* =========================================================
   Glass theme — buttons (Liquid Glass bubbles)
   ========================================================= */

body.theme-glass .btn-primary {
    background: rgba(26, 60, 52, 0.78);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(26, 60, 52, 0.25);
    color: #fff;
    transition: all 0.2s;
}

body.theme-glass .btn-primary:hover,
body.theme-glass .btn-primary:focus {
    background: rgba(45, 106, 79, 0.82);
    box-shadow: 0 4px 16px rgba(26, 60, 52, 0.3);
    color: #fff;
}

body.theme-glass .btn-outline-primary {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(45, 106, 79, 0.4);
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    color: var(--color-primary);
    transition: all 0.2s;
}

body.theme-glass .btn-outline-primary:hover,
body.theme-glass .btn-outline-primary:focus {
    background: rgba(45, 106, 79, 0.75);
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 60, 52, 0.25);
}

body.theme-glass .btn-secondary,
body.theme-glass .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    color: var(--color-primary);
    transition: background 0.18s, box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}

body.theme-glass .btn-secondary:hover,
body.theme-glass .btn-outline-secondary:hover {
    background: rgba(45, 106, 79, 0.15);
    border-color: rgba(45, 106, 79, 0.45);
    box-shadow:
        0 0 0 1px rgba(201, 168, 76, 0.2),
        0 4px 14px rgba(26, 60, 52, 0.15);
    transform: translateY(-1px);
    color: var(--color-primary);
}

body.theme-glass .btn-danger {
    background: rgba(181, 52, 46, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(181, 52, 46, 0.25);
    color: #fff;
}

/* =========================================================
   Glass theme — navbar
   ========================================================= */

body.theme-glass .navbar-bridge {
    backdrop-filter: blur(32px) saturate(180%) brightness(1.05) !important;
    -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.05) !important;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06),
                0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Home page — hero behind navbar, go very transparent */
body.theme-glass:has(.hero-section) .navbar-bridge {
    background: rgba(26, 60, 52, 0.45) !important;
}

/* All other pages — cream background behind navbar, stay opaque */
body.theme-glass:not(:has(.hero-section)) .navbar-bridge {
    background: rgba(26, 60, 52, 0.88) !important;
}

/* =========================================================
   Glass theme — hero content panel
   ========================================================= */

body.theme-glass .hero-section .col-lg-8 {
    background: rgba(10, 28, 20, 0.38);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 2.5rem 2rem !important;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* =========================================================
   Glass theme — custom template buttons
   (defined in per-template <style> blocks; overridden here)
   ========================================================= */

/* Green action buttons: Trimite, Salvează, Înscrie-te, PIN submit */
body.theme-glass .btn-submit,
body.theme-glass .btn-save,
body.theme-glass .btn-add,
body.theme-glass .btn-green,
body.theme-glass .btn-submit-pin {
    background: rgba(26, 60, 52, 0.78) !important;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(26, 60, 52, 0.25);
    color: #fff !important;
    transition: all 0.2s !important;
}

body.theme-glass .btn-submit:hover,
body.theme-glass .btn-save:hover,
body.theme-glass .btn-add:hover,
body.theme-glass .btn-green:hover,
body.theme-glass .btn-submit-pin:hover {
    background: rgba(45, 106, 79, 0.85) !important;
    box-shadow: 0 4px 16px rgba(26, 60, 52, 0.3);
    transform: translateY(-1px) !important;
}

/* Gold action buttons: Alege, btn-gold, portfolio CTA */
body.theme-glass .btn-pair,
body.theme-glass .btn-gold,
body.theme-glass .btn-portfolio-cta {
    background: rgba(201, 168, 76, 0.75) !important;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.25);
    color: var(--color-primary) !important;
    transition: all 0.2s !important;
}

body.theme-glass .btn-pair:hover,
body.theme-glass .btn-gold:hover,
body.theme-glass .btn-portfolio-cta:hover {
    background: rgba(224, 200, 114, 0.82) !important;
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
    transform: translateY(-1px) !important;
}

/* Green outline button */
body.theme-glass .btn-green-outline {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(45, 106, 79, 0.5) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    color: var(--color-primary) !important;
    transition: all 0.2s !important;
}

body.theme-glass .btn-green-outline:hover {
    background: rgba(45, 106, 79, 0.75) !important;
    color: #fff !important;
}

/* Session date badge */
body.theme-glass .session-date-badge {
    background: rgba(26, 60, 52, 0.78) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(26, 60, 52, 0.2);
}

/* =========================================================
   Glass theme — cards & panels
   ========================================================= */

body.theme-glass .card {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0.55) 100%
    );
    backdrop-filter: blur(20px) saturate(160%) brightness(1.05);
    -webkit-backdrop-filter: blur(20px) saturate(160%) brightness(1.05);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-top-color: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-glass .card-header {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.35) 100%
    );
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 14px 14px 0 0 !important;
}

/* ----- Archive cards ----- */
body.theme-glass .archive-card {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0.45) 100%
    );
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-left: 3px solid var(--color-accent);
    border-top-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* =========================================================
   Glass theme — modals
   ========================================================= */

body.theme-glass .modal-content {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.78) 0%,
        rgba(255, 255, 255, 0.62) 100%
    );
    backdrop-filter: blur(32px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.05);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-top-color: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.theme-glass .modal-header {
    border-bottom: 1px solid rgba(201, 168, 76, 0.18);
}

body.theme-glass .modal-footer {
    border-top: 1px solid rgba(201, 168, 76, 0.18);
}

/* =========================================================
   Glass theme — hero schedule box
   ========================================================= */

body.theme-glass .hero-schedule-box {
    background: rgba(10, 28, 20, 0.5) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(201, 168, 76, 0.45) !important;
    border-top-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border-radius: 14px;
}

/* =========================================================
   Glass theme — alerts
   ========================================================= */

body.theme-glass .alert {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
}

body.theme-glass .alert-success {
    background: rgba(64, 145, 108, 0.15);
    border-color: rgba(64, 145, 108, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-glass .alert-danger {
    background: rgba(181, 52, 46, 0.12);
    border-color: rgba(181, 52, 46, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-glass .alert-warning {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* =========================================================
   Glass theme — dividers & misc accents
   ========================================================= */

body.theme-glass hr {
    border-color: rgba(201, 168, 76, 0.2);
    opacity: 1;
}

body.theme-glass .dropdown-divider {
    border-color: rgba(201, 168, 76, 0.2);
}

/* Badge accents */
body.theme-glass .badge {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.theme-glass .badge.bg-primary,
body.theme-glass .badge.rounded-pill {
    background: rgba(45, 106, 79, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(26, 60, 52, 0.2);
}

/* =========================================================
   Glass theme — rounded tables
   ========================================================= */

body.theme-glass .table-responsive {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-glass .table {
    margin-bottom: 0;
    border-collapse: collapse;
}

/* Round thead top corners */
body.theme-glass .table > thead > tr:first-child > th:first-child {
    border-top-left-radius: 13px;
}
body.theme-glass .table > thead > tr:first-child > th:last-child {
    border-top-right-radius: 13px;
}

/* Round last row bottom corners */
body.theme-glass .table > tbody > tr:last-child > td:first-child,
body.theme-glass .table > tbody > tr:last-child > th:first-child {
    border-bottom-left-radius: 13px;
}
body.theme-glass .table > tbody > tr:last-child > td:last-child,
body.theme-glass .table > tbody > tr:last-child > th:last-child {
    border-bottom-right-radius: 13px;
}

/* Header glass treatment */
body.theme-glass .table thead th,
body.theme-glass .table > thead > tr > th {
    background: rgba(26, 60, 52, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--color-accent);
}

/* Row separators — softer than default */
body.theme-glass .table > tbody > tr > td,
body.theme-glass .table > tbody > tr > th {
    border-color: rgba(201, 168, 76, 0.1);
    transition: background 0.15s;
}

/* =========================================================
   Glass theme — table row hover
   ========================================================= */

body.theme-glass .table > tbody > tr {
    transition: background 0.15s;
}

body.theme-glass .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: transparent;
    background: rgba(201, 168, 76, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5),
                inset 0 -1px 0 rgba(201, 168, 76, 0.1);
}
