/* Session Fakebook Styles */

/* Fakebook page header styles - only apply on fakebook.html */
body.fakebook-page header h1 {
    font-family: 'Indie Flower', cursive;
    font-weight: bold;
    font-size: 3rem;
}

body.fakebook-page header .tagline {
    font-family: 'Indie Flower', cursive;
    font-size: 1.5rem;
}

.fakebook-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    padding: 20px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    font-size: 1.3rem;
    font-family: 'Indie Flower', cursive;
    color: var(--text-secondary);
    white-space: nowrap;
}

.fakebook-stats #fakebookCount {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Indie Flower', cursive;
    color: var(--text-accent);
    line-height: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-accent);
}

.dark-theme .stat-value {
    color: var(--text-secondary);
}

.unlimited-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.fakebook-container {
    padding: 0;
    margin: 0;
}

.fakebook-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.fakebook-item:hover {
    box-shadow: var(--shadow-elevated);
}

.fakebook-item-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
    position: relative;
}

.fakebook-item-title {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    min-width: 0;
    padding-right: 10px;
}

.fakebook-item-title h3 {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    color: var(--text-accent);
    font-family: 'Uncial Antiqua', 'Cinzel', 'Trajan Pro', Georgia, serif;
}

.fakebook-tune-metadata {
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    font-family: Georgia, serif;
}

.fakebook-item-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge, .key-badge, .difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge {
    background: var(--bg-badge);
    color: var(--text-primary);
}

.key-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.difficulty-badge {
    background: #e8f5e9;
    color: #2e7d32;
    text-transform: capitalize;
}

.dark-theme .difficulty-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.fakebook-item-actions {
    display: contents;
}

/* Bin button - top right, column 3, row 1 */
.fakebook-item-actions .bin-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

/* Headphones - bottom middle, column 2, row 2 */
.fakebook-item-actions > button:not(.bin-button),
.fakebook-item-actions > #play-btn-fakebook {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

/* Controls - bottom right, column 3, row 2 */
.fakebook-item-actions > a {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
}

.fakebook-item .btn-icon {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0.7;
    text-decoration: none;
}

/* Mobile tap feedback - immediate press-in effect while tapping */
.btn-icon:active {
    transform: scale(0.9);
    opacity: 0.4;
}

/* Only apply hover AND transitions on devices that support hovering (desktop) */
@media (hover: hover) {
    .fakebook-item .btn-icon {
        transition: all 0.2s ease;
    }

    .btn-icon:hover {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.fakebook-sheet-music {
    overflow-x: auto;
    margin-bottom: 16px;
}

.fakebook-sheet-music svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Indie Flower font for chord symbols */
.fakebook-sheet-music svg text[data-name="chord"] {
    font-family: 'Indie Flower', cursive !important;
    font-size: 20px !important;
    font-weight: bold !important;
    fill: #000000 !important;
}

.dark-theme .fakebook-sheet-music svg text[data-name="chord"] {
    fill: var(--text-muted) !important;
}

/* Volta bracket numbers in Fake Book */
.dark-theme .fakebook-sheet-music svg g[data-name="ending"] text,
.dark-theme .fakebook-sheet-music svg g[data-name="ending"] tspan {
    fill: var(--text-muted) !important;
}

/* Volta bracket lines in Fake Book */
.dark-theme .fakebook-sheet-music svg g[data-name="ending"] path {
    stroke: var(--text-muted) !important;
    fill: none !important;
}

.fakebook-sheet-music svg .abcjs-note {
    fill: #000000 !important;
}

.dark-theme .fakebook-sheet-music svg .abcjs-note,
.dark-theme .fakebook-sheet-music svg .abcjs-notehead,
.dark-theme .fakebook-sheet-music svg path,
.dark-theme .fakebook-sheet-music svg ellipse,
.dark-theme .fakebook-sheet-music svg circle {
    fill: var(--text-muted) !important;
}

.fakebook-attribution {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.empty-state h3 {
    margin-bottom: 16px;
    color: var(--text-accent);
}

.dark-theme .empty-state h3 {
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.empty-state .btn-primary {
    margin-top: 20px;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Upgrade modal specific styles */
.fakebook-upgrade-benefits {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.fakebook-upgrade-benefits h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.fakebook-upgrade-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fakebook-upgrade-benefits li {
    padding: 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn-primary {
    width: 100%;
}

.modal-actions .btn-secondary {
    width: 100%;
}

/* Premium modal styling */
/* Light mode: make modal title and description dark green */
#fakebookUpgradeModal h2,
#fakebookUpgradeModal .modal-content > p {
    color: var(--text-accent);
}

.dark-theme #fakebookUpgradeModal h2,
.dark-theme #fakebookUpgradeModal .modal-content > p {
    color: var(--text-muted); /* Tan in dark mode */
}

.fakebook-upgrade-benefits h3 {
    color: var(--text-accent); /* Light: dark green, Dark: gold */
}

.fakebook-upgrade-benefits ul,
.fakebook-upgrade-benefits li {
    color: var(--text-accent); /* Light mode: dark green */
}

.dark-theme .fakebook-upgrade-benefits ul,
.dark-theme .fakebook-upgrade-benefits li {
    color: var(--text-muted); /* Dark mode: tan */
}

/* Make upgrade button text bold in both themes */
#fakebookUpgradeModal .btn-primary {
    font-weight: bold;
}

/* Dark theme GOLD button for upgrade modal - starts gold */
.dark-theme #fakebookUpgradeModal .btn-primary {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark-theme #fakebookUpgradeModal .btn-primary:hover {
    background: linear-gradient(135deg, #f4e4bc, #d4af37);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .fakebook-stats {
        flex-direction: column;
        gap: 20px;
    }

    .fakebook-item-header {
        gap: 6px;
        margin-bottom: 4px;
    }

    .fakebook-item-title {
        padding-right: 6px;
    }

    .fakebook-item-title h3 {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .fakebook-tune-metadata {
        display: block;
        font-size: 0.85rem;
    }

    .fakebook-attribution {
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        gap: 4px;
        text-align: center;
        align-items: center;
    }

    .attribution-metadata {
        display: block;
    }

    .fakebook-item {
        padding: 8px;
    }

    .fakebook-sheet-music {
        display: flex;
        justify-content: center;
        overflow: visible;
        margin-left: 0;
        margin-right: 0;
    }

    .fakebook-sheet-music svg {
        display: block;
        margin: 0 auto;
        width: 100% !important;
        height: auto !important;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .fakebook-attribution {
        font-size: 0.8rem;
    }
}

/* Print styles for printing fakebook */
@media print {
    .auth-section-top,
    header .header-actions,
    .fakebook-stats,
    .fakebook-item-actions,
    .btn-icon,
    footer {
        display: none !important;
    }

    .fakebook-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }

    .fakebook-sheet-music {
        background: white;
    }

    body {
        background: white;
    }
}
