/* Forms Styles - Common for submit_original and submit_cover */

/* Hero Sections for Submit Forms */
.original-submit-hero,
.cover-submit-hero {
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    margin-bottom: 1.5rem;
}

.original-submit-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.cover-submit-hero {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.original-submit-hero .hero-icon,
.cover-submit-hero .hero-icon {
    font-size: 1.5rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.original-submit-hero .hero-icon:hover,
.cover-submit-hero .hero-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.original-submit-hero .hero-title,
.cover-submit-hero .hero-title {
    font-size: 1.125rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.original-submit-hero .hero-subtitle,
.cover-submit-hero .hero-subtitle {
    font-size: 0.813rem;
    opacity: 0.9;
    font-weight: 400;
}

.submit-container {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}

/* Compact Header - Horizontal Layout */
.page-header-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.page-header-text {
    flex: 1;
}

.page-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.page-description {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin: 0;
}

/* Old styles for backward compatibility */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Two Column Card */
.submit-card-twocol {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Compact Info Alert */
.info-alert-compact {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.info-alert-compact i {
    color: #3b82f6;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.info-alert-compact.cover {
    background: #fff7ed;
    border-color: #fed7aa;
}

.info-alert-compact.cover i {
    color: #ff6b35;
}

.info-alert-content {
    flex: 1;
}

.info-alert-content strong {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--dark-color);
    display: block;
    margin-bottom: 0.25rem;
}

.info-alert-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Compact Form Sections */
.form-section-compact {
    margin-bottom: 1rem;
}

.form-section-title-compact {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-section-title-compact i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Old styles for backward compatibility */
.submit-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-alert {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
}

.info-alert i {
    color: #3b82f6;
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.info-alert h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 0.25rem 0;
}

.info-alert p {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.crispy-form .form-control,
.crispy-form .form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.crispy-form .form-control:focus,
.crispy-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crispy-form label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}

.crispy-form textarea {
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--primary-color);
    border: none;
    color: white;
    transition: all 0.2s ease;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    color: white;
}

.submit-btn:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
}

.submit-btn:disabled:hover {
    background: #d1d5db;
    transform: none;
    box-shadow: none;
}

/* Cover Submit Button - Orange Theme */
.cover-submit-btn {
    background: #ff6b35;
}

.cover-submit-btn:hover:not(:disabled) {
    background: #f7931e;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.submit-btn i {
    font-size: 1rem;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.help-text-compact {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Submit Actions */
.submit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    font-size: 0.813rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Original Search Styles (for submit_cover page) */
.original-search-wrapper {
    position: relative;
}

.original-search-input {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.original-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

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

.search-result-item:hover {
    background: var(--light-gray);
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.selected-original {
    display: none;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.selected-original.show {
    display: block;
}

.selected-original-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-original-title i {
    color: #22c55e;
}

.selected-original-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.change-original-btn {
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-original-btn:hover {
    background: var(--light-gray);
    border-color: var(--primary-color);
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

#div_id_original {
    display: none;
}

/* Hide labels for specific fields rendered without as_crispy_field */
#div_id_description label,
#div_id_youtube_url label {
    display: none;
}

/* Ensure form controls without labels have proper styling */
.form-section-compact .mb-3 > textarea,
.form-section-compact .mb-3 > input[type="url"],
.form-section-compact .mb-3 > input[type="text"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-section-compact .mb-3 > textarea:focus,
.form-section-compact .mb-3 > input[type="url"]:focus,
.form-section-compact .mb-3 > input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-section-compact .mb-3 > textarea {
    min-height: 100px;
    resize: vertical;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .submit-card-twocol {
        padding: 1rem;
    }

    .form-section-compact {
        margin-bottom: 1.25rem;
    }

    .submit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .submit-actions .submit-btn {
        order: 1;
    }

    .submit-actions .back-link {
        order: 2;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Autocomplete Styles */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.25rem;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    font-size: 0.875rem;
    color: var(--dark-color);
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--light-gray);
}

@media (max-width: 768px) {
    /* Hero Sections for Mobile */
    .original-submit-hero,
    .cover-submit-hero {
        padding: 0.75rem 0;
    }

    .original-submit-hero .hero-title,
    .cover-submit-hero .hero-title {
        font-size: 1rem;
    }

    .original-submit-hero .hero-subtitle,
    .cover-submit-hero .hero-subtitle {
        font-size: 0.75rem;
    }

    .original-submit-hero .hero-icon,
    .cover-submit-hero .hero-icon {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }

    .submit-card {
        padding: 1rem;
    }

    .submit-container {
        margin: 0 auto 1rem;
    }

    .page-header-compact {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem;
    }

    .page-header-text {
        width: 100%;
    }

    .page-title {
        font-size: 1.125rem;
    }

    .page-description {
        font-size: 0.75rem;
    }

    .page-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .submit-card-twocol {
        padding: 0.875rem;
    }

    .info-alert-compact {
        padding: 0.625rem;
    }

    .form-section-title-compact {
        font-size: 0.813rem;
    }

    .help-text-compact {
        font-size: 0.688rem;
    }
}

/* Artist Similarity Warning Styles */
.artist-similarity-warning {
    margin-top: 0.75rem;
    position: relative;
    z-index: 100;
}

.similarity-alert {
    background: #fff3cd;
    border-color: #ffc107;
    border-radius: 8px;
    padding: 1rem;
    animation: slideDown 0.3s ease-out;
}

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

.similarity-alert strong {
    color: #856404;
    font-size: 0.875rem;
}

.similarity-alert p {
    font-size: 0.813rem;
    color: #664d03;
}

.similar-artists-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.similar-artist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: white;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.similar-artist-item:last-child {
    margin-bottom: 0;
}

.similar-artist-item:hover {
    border-color: #ff9800;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.similar-artist-item .use-artist-btn {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.similar-artist-item .use-artist-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.similar-artist-item strong {
    color: var(--dark-color);
    font-size: 0.875rem;
}

.similar-artist-item .text-muted {
    font-size: 0.75rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .similar-artist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .similar-artist-item .use-artist-btn {
        width: 100%;
        text-align: center;
    }
}
