/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
#main-nav {
    z-index: 1000;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 36px;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #28a745;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    text-align: center;
    font-size: 1.1rem;
    max-width: 80%;
}

.notification.show {
    opacity: 1;
}

.notification.error {
    background-color: #dc3545;
}

/* Homepage Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: url('/assets/images/stage_background.png') center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.welcome-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

@media screen and (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: #343537;
    margin-bottom: 2.5rem;
}

.action-buttons {
    margin-top: 1rem;
}

.action-buttons .btn {
    margin: 0 0.5rem;
    padding: 0.5rem 1.5rem;
}

/* Song Editor Layout */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-container {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 56px);
}

.editor-pane, .preview-pane {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.editor-pane {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.preview-pane {
    background-color: #fff;
}

/* Editor */
#editor {
    width: 100%;
    height: 100%;
    font-family: monospace;
    resize: none;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 1rem;
    font-size: 14px;
    line-height: 1.6;
}

/* Toolbar */
.toolbar {
    padding: 0.5rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
}

/* Preview Styles */
.preview-content {
    font-family: 'Times New Roman', Times, serif;
    padding: .5rem;
    flex: 1;
    white-space: pre;
    font-size: 14px;
}

.preview-header {
    margin-bottom: 1.5rem;
    white-space: normal;
}

.preview-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #333;
}

.preview-meta {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.preview-capo {
    color: #666;
    font-size: 2rem;
    float: right;
    margin-top: -3.4rem;
}

.verse {
    margin-bottom: 2rem;
}

.section-name {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

.line {
    margin-bottom: 0.5rem;
    position: relative;
    padding-top: 1.5em;
    white-space: pre;
    line-height: 1.5;
    font-size: 14px;
    color: #333;
}

.line.lyric-only {
    padding-top: 0;
    margin-top: 0.4rem;
}

.chord {
    color: #2c5282;
    font-weight: bold;
    font-family: monospace;
    position: relative;
    top: -1.5em;
    display: inline-block;
    width: 0;
    white-space: nowrap;
    font-size: 14px;
    overflow: visible;
}

.chord-progression {
    font-family: monospace;
    white-space: pre;
    margin: -1em 0 0 0;
    font-weight: 800;
}

.bar {
    color: #666; /* or any color you prefer for the bar lines */
}

/* Page break indicator for editor page only */
.preview-content .new-page {
    height: 2px;
    background-color: #ddd;
    margin: 1rem 0;
    position: relative;
}

.preview-content .new-page::before {
    content: "Page Break";
    position: absolute;
    top: -14px;
    left: 0;
    font-size: 10px;
    color: #999;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Song List Styles */
.table {
    margin-bottom: 1rem;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

.table .btn {
    margin: 0 0.25rem;
}

.table .btn-sm {
    padding: 0.25rem 0.5rem;
}

.table .fa-edit,
.table .fa-trash {
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Songs table styles */
.song-list {
    min-height: 225px;
}
.songs-table {
    width: 100%;
    border: 1px solid #dee2e6;
}

.songs-table td:first-child {
    text-align: left;
    min-width: 200px;
}

.songs-table td:last-child {
    width: 120px;
    text-align: right;
    white-space: nowrap;
}

.songs-table td {
    vertical-align: middle;
}

/* Help Button */
.help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.help-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.help-button i {
    font-size: 1.5rem;
}

/* Print Styles */
@media print {
    /* Hide non-printable elements */
    .toolbar,
    .editor-pane,
    .help-button,
    .notification,
    .btn,
    .no-print {
        display: none !important;
    }

    /* Reset page margins and background */
    @page {
        margin: 1.5cm;
        size: A4;
    }

    body {
        background: none;
        margin: 0;
        padding: 0;
    }

    /* Ensure preview content fills the page properly */
    .preview-pane {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        background: none;
        border: none;
    }

    .preview-content {
        padding: 0;
        font-size: 12pt;
    }

    /* Adjust title and meta information for print */
    .preview-title {
        font-size: 24pt;
        margin-bottom: 0.5cm;
    }

    .preview-meta {
        font-size: 12pt;
        margin-bottom: 1cm;
    }

    /* Adjust chord and lyric spacing for print */
    .line {
        line-height: 2.2;
        page-break-inside: avoid;
    }

    .chord {
        font-size: 10pt;
        top: -1.2em;
    }

    /* Handle page breaks */
    .verse {
        page-break-inside: avoid;
    }

    .new-page {
        page-break-after: always;
    }

    /* Hide page break indicators in print */
    .new-page::before {
        display: none;
    }

    /* Ensure proper spacing between sections */
    .section-name {
        margin-top: 0.5cm;
        margin-bottom: 0.3cm;
    }
}

.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.35rem 0.75rem;
    border-radius: 0.2rem;
    margin-bottom: 1rem;
    font-size: 0.97rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
    color: #adb5bd;
    margin: 0 0.3rem;
}
.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
    font-size: 0.98em;
}
.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.98em;
}
.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.dropdown-toggle::after {
    display: none;
}

.badge-role {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
} 

.audio-player {
    position: relative;
    top: 6px;
    width: 200px;
}
.delete-song-audio {
    position: relative;
    top: -5px;
}
#aiToolsMenu {
    top: 60px;
    right: 21px;
    z-index: 1000;
}