/* Songbook Container */
.songbook-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 20px auto;
}

/* Song Items */
.songbook-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--background-color, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.songbook-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Song Title and Index */
.moreElementsSongBook {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.song-index {
    min-width: 30px;
    color: var(--text-color-secondary, #666);
}

.song-title {
    color: var(--text-color-primary, #333);
    text-decoration: none;
    font-weight: 500;
}

/* Controls */
.songbook-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.move-song {
    padding: 8px;
    border: none;
    background: var(--button-background, #f0f0f0);
    color: var(--button-color, #333);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.move-song:hover {
    background: var(--button-hover-background, #e0e0e0);
}

.remove-song {
    color: var(--danger-color, #dc3545);
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.remove-song:hover {
    color: var(--danger-hover-color, #bd2130);
}

/* Auth Prompt */
.auth-prompt {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
}

body.day-theme .auth-prompt {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #333333;
}

body.evening-theme .auth-prompt {
    background-color: #34495e;
    border: 1px solid #2c3e50;
    color: #ecf0f1;
}

body.night-theme .auth-prompt {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #ffffff;
}

.auth-prompt .auth-link {
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.auth-prompt a {
    color: var(--link-color, #007bff);
    text-decoration: none;
    font-weight: 500;
}

.auth-prompt a:hover {
    text-decoration: underline;
}

.auth-link {
    cursor: pointer;
    color: var(--link-color, #007bff);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .songbook-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .songbook-controls {
        width: 100%;
        justify-content: center;
    }

    .order-buttons {
        flex-direction: row;
    }
}

.songbook-list {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    max-width: 800px;
}

.songbook-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 8px;
    background: var(--background-color, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.songbook-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.moreElementsSongBook {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0;
}

.songbook-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drag-handle {
    cursor: grab;
    padding: 8px;
    border-radius: 4px;
    background: var(--handle-bg, #f5f5f5);
    color: var(--handle-color, #666);
    display: flex;
    align-items: center;
    gap: 8px;
    touch-action: none;
}

.drag-handle:hover {
    background-color: #f0f0f0;
    color: #333;
}

.drag-handle i {
    font-size: 1.2em;
}

.drag-icon {
    width: 24px;
    height: 24px;
    color: #666;
    transition: color 0.2s ease;
}

.drag-handle:hover .drag-icon {
    color: #333;
}

.mobile-hint {
    display: none;
    color: #666;
    font-size: 0.8em;
}

.remove-button {
    padding: 5px;
}

.remove-song {
    color: red;
    text-decoration: none;
}

.dragging {
    opacity: 0.6;
    background-color: #f8f9fa;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.drag-over {
    border-top: 2px solid #4CAF50;
    padding-top: 13px;
}

.drop-indicator {
    height: 2px;
    background-color: #4CAF50;
    margin: -8px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drop-indicator.active {
    opacity: 1;
}

.song-index {
    min-width: 30px;
    color: #666;
    font-weight: 500;
}

.saving-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    display: none;
    z-index: 1000;
}

.saving-indicator.active {
    display: block;
    animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Мобільні стилі */
@media (max-width: 768px) {
    .songbook-item {
        padding: 12px;
        margin-bottom: 6px;
    }

    .drag-handle {
        padding: 10px;
        background-color: #f5f5f5;
        border-radius: 6px;
        width: 100%;
        justify-content: center;
    }

    .mobile-hint {
        display: inline-block;
    }

    .songbook-controls {
        flex-direction: column;
        gap: 8px;
    }

    .dragging {
        background-color: #e9ecef;
        transform: scale(1.02);
    }
    
    .drag-over {
        border-top: 3px solid #4CAF50;
    }
}

/* Відключаємо стандартні touch-події на мобільних */
@media (pointer: coarse) {
    .songbook-item {
        touch-action: pan-y pinch-zoom;
    }
    
    .drag-handle {
        touch-action: none;
    }
}
