/* Setlist Builder Styles */
.setlist-builder-page {
    padding: 2rem 0;
}

.hero-setlist-builder {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.hero-setlist-builder h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.highlight-gold {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.setlist-builder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.builder-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.builder-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Template Selector */
.template-selector {
    margin-bottom: 3rem;
}

.template-selector h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #34495e;
}

.preset-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.template-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.template-card:hover {
    border-color: #f39c12;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.template-card.active {
    border-color: #e67e22;
    background: #fef9e7;
}

.template-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.template-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.template-card .duration {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.template-card.custom {
    border-color: #9b59b6;
}

.template-card.custom:hover {
    border-color: #8e44ad;
}

/* Form Sections */
#setlist-builder-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.mandatory-sections,
.optional-sections,
.special-moments {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.mandatory-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.mandatory-block h4 {
    color: #495057;
    margin-bottom: 1rem;
}

.mandatory-block select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
}

.hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Medley Items */
.draggable-medley-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.medley-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medley-item:hover {
    border-color: #f39c12;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.medley-item.selected {
    background: #e8f5e8;
    border-color: #28a745;
}

.medley-title {
    font-weight: 500;
    color: #2c3e50;
}

.medley-duration {
    color: #6c757d;
    font-size: 0.9rem;
    font-family: monospace;
}

/* Special Moments */
.special-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.special-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.special-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.special-option label {
    cursor: pointer;
    font-weight: 500;
}

/* Duration Tracker */
.duration-tracker {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.current-duration {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107);
    transition: width 0.3s ease;
}

.progress.over-limit {
    background: linear-gradient(90deg, #ffc107, #dc3545);
}

.warnings {
    text-align: center;
}

.duration-message {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 0.5rem 0;
    font-weight: 500;
}

.duration-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.duration-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.duration-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.duration-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Submit Section */
.submit-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #f39c12;
    color: white;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .setlist-builder-container {
        padding: 1rem;
    }
    
    .preset-templates {
        grid-template-columns: 1fr;
    }
    
    .draggable-medley-list {
        grid-template-columns: 1fr;
    }
    
    .special-options {
        grid-template-columns: 1fr;
    }
    
    .submit-section {
        flex-direction: column;
    }
    
    .hero-setlist-builder h1 {
        font-size: 2rem;
    }
}

.template-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.template-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

.template-card .medley-count {
    font-size: 0.8em;
    color: #666;
}

.repertoire-item, .setlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.repertoire-item:hover {
    background-color: #f5f5f5;
}

.setlist-item.mandatory {
    background-color: #e6f3ff;
}

.setlist-item.optional {
    background-color: #f0f0f0;
}

.add-btn, .remove-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.remove-btn {
    background-color: #f44336;
}
