/* ============================================================
   Online zpěvník – hlavní styly
   Tématická barva: #664CFF (původní aplikace)
   ============================================================ */

/* --- Typografie --- */
html, body {
    font-size: 100%;
    background: #fff;
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: #664CFF;
    margin: 0 0 0.6rem;
}


a { color: #664CFF; }
a:hover { color: #4a33d4; text-decoration: none; }

/* --- Header --- */
.site-header {
    background-color: #E0E0E0;
    padding: 0.75em 0;
    border-bottom: 2px solid #c8c8c8;
}

.site-header .navbar-brand {
    font-size: 2.2em;
    font-weight: 800;
    color: #000 !important;
    letter-spacing: -0.5px;
}

.site-header .navbar-brand span {
    color: #664CFF;
}

.brand-accent { color: #664CFF; }

/* Responzivní logo */
.brand-short { display: none; }
.brand-full  { display: inline; }

@media (max-width: 575px) {
    .site-header .brand-full  { display: none !important; }
    .site-header .brand-short { display: inline !important; }
    .site-header .navbar-brand { font-size: 1.5em; }
}

.site-header .nav-link {
    color: #333 !important;
    font-weight: 500;
}

.site-header .nav-link:hover {
    color: #664CFF !important;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
    color: #664CFF;
    background-color: #f0edff;
}

.site-header .btn-login {
    background: #664CFF;
    color: #fff !important;
    border-radius: 4px;
    padding: 0.35em 1em;
    font-size: 0.9em;
    transition: background 0.2s;
    text-decoration: none;
}

.site-header .btn-login:hover {
    background: #4a33d4;
    color: #fff !important;
}

/* --- Hlavní obsah --- */
#content {
    padding: 2.5em 0;
    min-height: calc(100vh - 200px);
}

/* --- Tlačítka --- */
.btn-primary,
input[type="submit"] {
    background: #664CFF;
    border-color: #664CFF;
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.btn-primary:hover,
input[type="submit"]:hover {
    background: #4a33d4;
    border-color: #4a33d4;
}

.btn-outline-primary {
    color: #664CFF;
    border-color: #664CFF;
}

.btn-outline-primary:hover {
    background: #664CFF;
    border-color: #664CFF;
}

/* --- Flash zprávy --- */
.flash-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    text-align: center;
    z-index: 1050;
    pointer-events: none;
}

.flash-container .flash-inner {
    display: inline-block;
    background-color: #664CFF;
    color: #fff;
    max-width: 650px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    padding: 18px 25px;
    font-size: 1em;
    pointer-events: auto;
}

.flash-container .flash-inner.flash-danger  { background-color: #dc3545; }
.flash-container .flash-inner.flash-warning { background-color: #fd7e14; }
.flash-container .flash-inner.flash-success { background-color: #198754; }
.flash-container .flash-inner.flash-info    { background-color: #664CFF; }

/* --- Obsah písničky --- */
.song-content {
    font-size: 1rem;
    line-height: 2.6;
    font-family: 'Courier New', monospace;
}

.song-content sup {
    font-size: 0.75em;
    font-weight: bold;
    color: #664CFF;
    top: -0.9em;
    position: relative;
    line-height: 0;
    vertical-align: baseline;
}

/* --- Tabulka písniček – abecední oddělovač --- */
.alpha-header td {
    color: #664CFF !important;
    font-size: 1.8em;
    font-weight: bold;
    padding: 0.2em 0.5em !important;
    border: none;
    background: #fff;
}

/* --- Oblíbené / playlist ikony --- */
.btn-link.toggle-favourite,
.btn-link.toggle-playlist {
    text-decoration: none;
}

.btn-link.toggle-favourite:hover,
.btn-link.toggle-playlist:hover {
    text-decoration: none;
}

.icon-fav, .icon-playlist {
    color: #664CFF;
    font-size: 1.4em;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}

.icon-fav:hover, .icon-playlist:hover { opacity: 0.7; }

/* --- Ovládání detailu písničky --- */
.song-controls {
    background: #f5f3ff;
    border: 1px solid #ddd8ff;
    border-radius: 6px;
    padding: 0.5em 0.75em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.song-controls .btn-outline-secondary {
    color: #664CFF;
    border-color: #664CFF;
    padding: 0.2em 0.6em;
}

.song-controls .btn-outline-secondary:hover {
    background: #664CFF;
    color: #fff;
}

.song-controls .badge {
    background: #664CFF !important;
    min-width: 1.8em;
}

/* --- Karty zpěvníků --- */
.card {
    border-radius: 6px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(102, 76, 255, 0.15);
}

/* --- Profilové statistiky --- */
.stat-card {
    background: #f5f3ff;
    border-radius: 8px;
    padding: 1.5em 1em;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background 0.2s, box-shadow 0.2s;
    color: inherit;
}

.stat-card:hover {
    background: #ede9ff;
    box-shadow: 0 4px 12px rgba(102, 76, 255, 0.2);
    color: inherit;
    text-decoration: none;
}

.stat-card .stat-number {
    font-size: 2.8em;
    font-weight: 800;
    color: #664CFF;
    line-height: 1;
}

.stat-card .stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 0.3em;
}

/* --- Footer --- */
.site-footer {
    background: #232323;
    color: #C2C2C2;
    padding: 1.5em 0;
    margin-top: 3em;
}

.site-footer a {
    color: #C2C2C2;
    text-decoration: none;
}

.site-footer a:hover {
    color: #C2B9F5;
}

.site-footer-bottom {
    background: #3D3B3B;
    padding: 0.6em 0;
    text-align: center;
    font-size: 0.85em;
    color: #EEEEEE;
}

/* --- Formuláře --- */
input[type="text"],
input[type="email"],
textarea,
select,
.form-control,
.form-select {
    outline: none;
    border: 1px solid #999;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: #664CFF;
    box-shadow: 0 0 0 0.2rem rgba(102, 76, 255, 0.15);
}

/* --- Misc --- */
.text-primary { color: #664CFF !important; }
.bg-primary   { background-color: #664CFF !important; }
.border-primary { border-color: #664CFF !important; }

.bordered-section {
    border: 1px dotted #664CFF;
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
}

/* --- Tisk --- */
@media print {
    .no-print { display: none !important; }
    body { font-size: 11pt; }
    .song-content { font-size: 10pt; line-height: 1.8; }
    #songContent { font-size: 10pt; }
    #songContent .song-line { line-height: 1.5; min-height: auto; }
    #songContent sup { font-size: 0.7em; top: -0.7em; }
    a { color: inherit !important; text-decoration: none !important; }
    .site-header, .site-footer, .site-footer-bottom { display: none !important; }
}

/* --- Responzivní --- */
@media (max-width: 600px) {
    .song-content {
        font-size: 13px;
        line-height: 1.6;
    }

    .song-content sup {
        font-size: 11px;
    }

    h1 { font-size: 2em; }
}

/* --- Filter badges --- */
.filter-badge {
    display: inline-block;
    padding: 0.3em 0.85em;
    border-radius: 20px;
    border: 1.5px solid #664CFF;
    color: #664CFF;
    font-size: 0.85em;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
    background: #fff;
}

.filter-badge:hover {
    background: #ede9ff;
}

.filter-badge.active {
    background: #664CFF;
    color: #fff;
}
#songContent {
    font-size: 1rem;
    padding: 1rem 0;
    max-width: 760px;
}

/* Každý sup (akord) – zvednutý nad text, nulová výška */
#songContent sup {
    font-size: 0.75em;
    font-weight: 700;
    color: #664CFF;
    position: relative;
    top: -0.9em;
    line-height: 0;
    display: inline;
    margin-right: 0;
}

/* Řádky s akordy potřebují větší line-height */
#songContent .song-line {
    display: block;
    line-height: 1.5;
    min-height: 1.4em;
}

/* --- Fixovaný scroll panel na detailu písničky --- */
#scrollPanel {
    position: fixed;
    top: 150px;
    right: 5vw;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 100;
}

#scrollPanel button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #664CFF;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

#scrollPanel button:hover {
    background: #4a33d4;
}

#scrollPanel #scrollSpeed {
    font-size: 13px;
    font-weight: 700;
    color: #664CFF;
    line-height: 1;
}

@media (max-width: 728px) {
    #scrollPanel {
        right: 4px;
        opacity: 0.8;
    }
    #scrollPanel button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}
/* Kompaktnější řádky tabulek */
.table td, .table th {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* ============================================================
   Třídy nahrazující inline styly v šablonách
   ============================================================ */

/* Layout – vyhledávací box */
.search-box {
    border: 2px solid #664CFF;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
    background: #fdfcff;
}

.search-box-home {
    border: 2px solid #664CFF;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 2em;
    background: #fdfcff;
}

.search-input {
    border-color: #664CFF;
    border-right: none;
    font-size: 1em;
}

/* Tabulky – šířky sloupců */
.col-w-40  { width: 40px; }
.col-w-90  { width: 90px; }

/* Album detail – žánr badge */
.badge-zanr {
    background: #ede9ff;
    color: #664CFF;
    font-weight: 400;
}

/* Album detail – žánr v hlavičce */
.filter-badge-static {
    cursor: default;
    font-size: .8em;
}

/* Album edit – select žánru */
.select-zanr { max-width: 260px; }

/* Album edit – seznamy písniček */
.song-list-available {
    max-height: 380px;
    overflow-y: auto;
}

.song-list-selected {
    max-height: 380px;
    min-height: 60px;
    overflow-y: auto;
    border: 2px dashed #dee2e6;
    border-radius: .375rem;
    padding: .25rem;
}

/* Drag handle */
.drag-handle { cursor: grab; }

/* Spy mode select */
.spy-select { width: 260px; }

/* Homepage – feature karty */
.feature-card {
    background: #fdfcff;
    border: 1.5px solid #ede9ff;
    border-radius: 8px;
    padding: 1.2em;
    height: 100%;
}

.feature-card-icon {
    font-size: 1.6em;
    margin-bottom: .4em;
}

.feature-card-title { color: #664CFF; }

/* Homepage – sekce features */
.features-heading {
    font-size: 2em;
    text-align: center;
    margin-top: 3.5em;
    margin-bottom: 1.2em;
}

/* Homepage – login CTA */
.login-cta {
    text-align: center;
    margin-top: 3em;
    margin-bottom: 2em;
}

.login-cta p {
    margin-top: 3.5em;
}

/* Layout – navbar user link */
.navbar-user-link {
    text-decoration: none;
}

.navbar-user-name {
    color: #333;
    font-weight: 600;
}

/* Footer */
.footer-brand {
    font-size: 1.4em;
    font-weight: 800;
    color: #fff;
    margin-bottom: .5em;
}

.footer-brand span { color: #C2B9F5; }
.footer-desc { font-size: .85em; color: #999; }
.footer-nav { font-size: .9em; }
.footer-contact { font-size: .85em; color: #999; }

/* Tabulka – z-index pro akce na kartě */
.card-actions {
    position: relative;
    z-index: 1;
}

/* Song detail – summary odkaz */
.report-summary { cursor: pointer; }

/* Search – th width */
.th-icon { width: 90px; }

/* ============================================================
   Dashboard
   ============================================================ */

@media (max-width: 575px) {
    .dashboard-tile { min-height: 110px; padding: 0.8em 0.3em; }
    .dashboard-tile-icon { font-size: 2.8em; }
    .dashboard-tile-label { font-size: 0.72em; }
    .dashboard-tile-count { font-size: 1.1em; }
}

.dashboard-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f5f3ff;
    border: 1.5px solid #ede9ff;
    border-radius: 12px;
    padding: 1.2em 0.5em;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    min-height: 200px;
    position: relative;
}

.dashboard-tile:hover {
    background: #ede9ff;
    box-shadow: 0 4px 14px rgba(102, 76, 255, 0.18);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.dashboard-tile--admin {
    border-color: #ffc107;
    background: #fffdf0;
}

.dashboard-tile--admin:hover {
    background: #fff8d6;
    box-shadow: 0 4px 14px rgba(255, 193, 7, 0.25);
}

.dashboard-tile-icon {
    font-size: 4.5em;
    line-height: 1;
    margin-bottom: 0.4em;
}

.dashboard-tile-label {
    font-size: 0.82em;
    font-weight: 600;
    color: #444;
    line-height: 1.2;
}

.dashboard-tile-count {
    font-size: 1.4em;
    font-weight: 800;
    color: #664CFF;
    line-height: 1;
    margin-top: 0.2em;
}

.dashboard-tile-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.6em;
    font-weight: 700;
    background: #ffc107;
    color: #333;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: .05em;
}

/* Dashboard – pravý panel */
.dashboard-panel {
    background: #fdfcff;
    border: 1.5px solid #ede9ff;
    border-radius: 10px;
    padding: 1.2em 1.2em 1em;
}

.dashboard-panel-title {
    font-size: 1em;
    font-weight: 700;
    color: #664CFF;
    margin-bottom: 0.8em;
    text-align: left;
}

/* Seznam nejnovějších písniček */
.dashboard-latest-list {
    list-style: decimal;
    padding-left: 1.3em;
    margin: 0;
    font-size: 0.85em;
    line-height: 1.9;
}

.dashboard-latest-list a {
    color: #333;
    text-decoration: none;
}

.dashboard-latest-list a:hover {
    color: #664CFF;
}

/* Spy select – full width v panelu */
.spy-select.w-100 { width: 100% !important; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination .page-link {
    color: #664CFF;
    border-color: #e0d9ff;
    border-radius: 6px !important;
    margin: 0 2px;
    min-width: 32px;
    text-align: center;
}

.pagination .page-link:hover {
    background: #ede9ff;
    border-color: #664CFF;
    color: #4a33d4;
}

.pagination .page-item.active .page-link {
    background: #664CFF;
    border-color: #664CFF;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #bbb;
    border-color: #e0d9ff;
    background: transparent;
}
/* --- Osobní poznámka k písničce --- */
.song-note textarea {
    resize: none;
    overflow: hidden;
    min-height: 2.5rem;
    background: #fffbea;
    border-color: #f1e3a6;
}
.song-note textarea:focus {
    background: #fffdf3;
}
