.reflow-container {
    display: flex;
    height: 74vh;
    gap: 20px;
}

.toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #ddd;
    margin-bottom: 15px;
}

.title-container {
    flex: 0 0 30%;
    max-width: 400px;
}

.song-title-input {
    width: 80%;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    border: 2px solid transparent;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: white;
    transition: border-color 0.2s;
}

.song-title-input:focus {
    outline: none;
    border-color: #007bff;
    background-color: #f8f9fa;
}

.song-title-input:hover {
    border-color: #ddd;
}

.toolbar h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

.toolbar-btn {
    padding: 8px 16px;
    font-size: 0.95em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    transition: background-color 0.2s;
}

.toolbar-btn:hover {
    background-color: #0056b3;
}

.file-upload-label {
    display: inline-block;
    font-family: inherit;
    font-weight: normal;
}

.presentation-hint {
    margin-left: 30px;
    font-size: 1.5em;
    font-weight: bold;
    color: #101010;
}

.editor-pane, .preview-pane {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    padding: 1px;
}

.editor-page {
    width: 98%;
    min-height: 10px;
    font-family: monospace;
    padding: 0px;
    border: 1px solid #ddd;
    resize: none;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 0;
    margin-left: 3px;
    display: block;
    overflow-y: hidden; /* Auto-grow */
}

.editor-page:focus {
    outline: 1px solid #007bff;
    border-color: #007bff;
}

.page-separator {
    height: 4px;
    background: #333;
    margin: 10px 0;
    border-radius: 2px;
}

.preview-pane {
    background: white;
}

.slide-segment {
    background: #222;
    color: white;
    margin: 5px;
    padding: 10px;
    min-height: 100px;
    border-radius: 4px;
    position: relative;
    white-space: pre-wrap; /* Crucial for CR/LN */
}

.slide-number {
    /* position: absolute;*/
    top: 5px;
    right: 10px;
    font-size: 0.8em;
    color: #ccc;
}

.controls {
    margin-top : 20px;
    margin-bottom: 10px;
    display: flex;
    height: 10vh;
    gap: 20px;
}

.save-btn, .cancel-btn {
    padding: 8px 16px;
    font-size: 1em;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.save-btn {
    background-color: #28a745;
    color: white;
}
.cancel-btn {
    background-color: #dc3545;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.search-input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}

.song-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.song-actions {
    display: flex;
    gap: 8px;
}

.song-action-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-btn {
    background-color: #007bff;
    color: white;
}

.load-btn:hover {
    background-color: #0056b3;
}

.edit-btn {
    background-color: #17a2b8;
    color: white;
}

.edit-btn:hover {
    background-color: #138496;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

.song-updated {
    font-size: 0.85em;
    color: #666;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.modal-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-actions .toolbar-btn.cancel {
    background-color: #6c757d;
}

.modal-actions .toolbar-btn.cancel:hover {
    background-color: #5a6268;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background-color: #28a745;
}

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

.toast-info {
    background-color: #17a2b8;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}