/**
 * CSS für Blues Events Frontend Submission Form
 * Datei: assets/css/submission.css
 */

/* ===== BASIS STYLES ===== */

.blues-event-submission-form-advanced {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.blues-event-submission-form-advanced * {
    box-sizing: border-box;
}

/* ===== MESSAGES ===== */

.submission-messages {
    margin-bottom: 30px;
}

.submission-success,
.submission-error {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.submission-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submission-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.submission-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.confirmation-notice {
    background: linear-gradient(135deg, #cce7ff 0%, #b8daff 100%);
    border: 1px solid #79afd1;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.confirmation-notice h3 {
    color: #0c5460;
    margin: 0 0 10px 0;
    font-size: 18px;
}

/* ===== FORM SECTIONS ===== */

.form-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.form-section h3 {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
    position: relative;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #007cba, #00a0d2);
}

.form-section h4 {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
}

/* ===== FORM ROWS ===== */

.form-row {
    margin-bottom: 20px;
}

.form-row-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.half {
    flex: 1;
}

.form-row.quarter {
    flex: 0 0 25%;
}

.form-row.three-quarters {
    flex: 0 0 calc(75% - 15px);
}

@media (max-width: 768px) {
    .form-row-group {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row.quarter,
    .form-row.three-quarters {
        flex: 1;
    }
}

/* ===== LABELS ===== */

label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

label.required::after {
    content: '*';
    color: #dc3232;
    margin-left: 4px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.4;
}

/* ===== INPUT FIELDS ===== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

input.error,
textarea.error,
select.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== CUSTOM CHECKBOXES ===== */

input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:checked + .checkmark {
    background: #007cba;
    border-color: #007cba;
}

input[type="checkbox"]:checked + .checkmark::after {
    display: block;
}

input[type="checkbox"]:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

/* ===== FILE UPLOAD ===== */

.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
}

.image-upload-container:hover,
.image-upload-container.drag-over {
    border-color: #007cba;
    background: #f0f8ff;
}

.upload-button {
    background: linear-gradient(135deg, #007cba 0%, #00a0d2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.upload-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.image-preview {
    margin-top: 20px;
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-button {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3232;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.remove-button:hover {
    background: #a23030;
    transform: scale(1.1);
}

/* ===== SEARCH FUNCTIONALITY ===== */

.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

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

.search-result-item.add-new-item {
    background: linear-gradient(135deg, #e3f2fd 0%, #d1e7dd 100%);
    color: #0c5460;
    font-style: italic;
}

.search-result-item.add-new-item:hover {
    background: linear-gradient(135deg, #d1e7dd 0%, #c3e6cb 100%);
}

/* ===== SELECTED ITEMS ===== */

.selected-venue,
.selected-musicians {
    margin-top: 15px;
}

.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #e7f3ff 0%, #d4e7ff 100%);
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.selected-item:hover {
    background: linear-gradient(135deg, #d4e7ff 0%, #c1dafe 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.selected-item .item-name {
    font-weight: 500;
    color: #0c5460;
    flex-grow: 1;
}

.selected-item .remove-item {
    background: #dc3232;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.selected-item .remove-item:hover {
    background: #a23030;
    transform: scale(1.1);
}

/* ===== ADD NEW FORMS ===== */

.add-new-musician,
.add-new-venue {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.add-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.add-button:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== FIELD HELPERS & ERRORS ===== */

.field-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.character-count {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.character-count.warning {
    color: #e67e22;
    font-weight: 600;
}

/* ===== SUBMIT SECTION ===== */

.submit-section {
    text-align: center;
    padding: 30px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
}

.submit-button {
    background: linear-gradient(135deg, #007cba 0%, #00a0d2 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    justify-content: center;
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.submit-info {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .blues-event-submission-form-advanced {
        margin: 0 15px;
    }
    
    .form-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .form-section h3 {
        font-size: 18px;
    }
    
    .submit-button {
        padding: 14px 30px;
        font-size: 16px;
        min-width: 200px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== LOADING STATES ===== */

.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading input,
.loading textarea,
.loading select,
.loading button {
    cursor: not-allowed;
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .blues-event-submission-form-advanced {
        color: #e0e0e0;
    }
    
    .form-section {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .form-section h3 {
        color: #ffffff;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        background: #3d3d3d;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .checkmark {
        background: #3d3d3d;
        border-color: #555;
    }
    
    .image-upload-container {
        background: #3d3d3d;
        border-color: #555;
    }
    
    .search-results {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .search-result-item:hover {
        background: #404040;
    }
    
    .add-new-musician,
    .add-new-venue {
        background: #3d3d3d;
        border-color: #555;
    }
}

/* ===== COUNTDOWN WIDGET STYLES ===== */

.blues-event-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    color: white;
    font-family: 'Courier New', monospace;
}

.countdown-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    min-width: 60px;
}

.countdown-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #76D7EA;
}

.countdown-label {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .blues-event-countdown {
        gap: 10px;
        padding: 15px;
    }
    
    .countdown-item {
        padding: 10px 5px;
        min-width: 50px;
    }
    
    .countdown-number {
        font-size: 18px;
    }
    
    .countdown-label {
        font-size: 10px;
    }
}

/* ===== LOKALE ERFOLGSMELDUNGEN (Ergänzung zu submission.css) ===== */

.local-success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 14px;
    animation: slideInFromTop 0.4s ease-out;
}

.local-success-message p {
    margin: 0;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}