/* Eventos Musicais - Estilos Públicos Modern & Clean */

/* Importar fonte Inter para um look mais premium */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variáveis CSS para fácil manutenção */
:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #f9fafb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

/* Reset e Base */
.eventos-musicais-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Header */
.em-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.em-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.em-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
    font-weight: 400;
}

/* Formulário Container */
.em-form {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Seções */
.em-section {
    padding: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.em-section:last-child {
    border-bottom: none;
}

.em-section-header {
    margin-bottom: 2.5rem;
}

.em-section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.em-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    letter-spacing: -0.025em;
}

.em-section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.em-icon {
    font-size: 1.4rem;
}

/* Contador de Seleção Moderno */
.em-selection-counter {
    background: #eff6ff;
    color: #4f46e5;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #c7d2fe;
    transition: all 0.3s ease;
}

/* Grid de Formulário */
.em-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Inputs Modernos */
.em-form-group {
    margin-bottom: 1.5rem;
}

.em-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
}

.em-required {
    color: var(--error-color);
}

.em-input,
.em-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.25s ease;
    font-family: inherit;
}

.em-input:hover,
.em-textarea:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.em-input:focus,
.em-textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.em-input::placeholder,
.em-textarea::placeholder {
    color: #94a3b8;
}

/* Filtros Estilizados */
.em-filters {
    margin-bottom: 2.5rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.em-filter-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.em-filter-group {
    margin-bottom: 1.5rem;
}

.em-filter-group:last-child {
    margin-bottom: 0;
}

.em-filter-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.em-filter-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.em-filter-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.em-filter-input::placeholder {
    color: #94a3b8;
}

.em-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.em-filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.em-filter-btn:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.em-filter-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

/* Lista de Músicas Cards */
.em-music-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem;
    background: transparent;
    border: none;
}

/* Scrollbar Customizada */
.em-music-list::-webkit-scrollbar {
    width: 6px;
}

.em-music-list::-webkit-scrollbar-track {
    background: transparent;
}

.em-music-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.em-music-item {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.em-music-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.em-music-item.selected {
    background: #f5f3ff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

/* Checkbox Moderno */
.em-music-checkbox {
    margin-right: 1.25rem;
    padding-top: 0.15rem;
}

.em-checkbox {
    display: none;
}

.em-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.35rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    flex-shrink: 0;
}

.em-checkbox:checked+.em-checkbox-label {
    background: #7c3aed;
    border-color: #7c3aed;
    transform: scale(1.05);
}

.em-checkbox:checked+.em-checkbox-label::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

/* Informações da Música */
.em-music-info {
    flex: 1;
    width: 100%;
}

.em-music-details {
    margin-bottom: 0.75rem;
}

.em-music-name {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.4;
}

.em-music-artist {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.em-music-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.em-music-style {
    background: #f1f5f9;
    color: #475569;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.em-music-item.selected .em-music-style {
    background: #ede9fe;
    color: #7c3aed;
}

.em-music-duration {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.25rem;
}

/* Botão de Envio Premium */
.em-submit-section {
    padding: 2.5rem;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

.em-submit-btn {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 1.125rem 3rem;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 240px;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    letter-spacing: 0.01em;
}

.em-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: #0f172a;
}

.em-submit-btn:active {
    transform: translateY(0);
}

/* Modal Moderno */
.em-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.em-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.em-modal-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    padding: 0;
}

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

.em-modal-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-bottom: none;
}

.em-modal-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #4ade80;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(74, 222, 128, 0.3);
}

.em-success-icon {
    font-size: 3rem;
    color: white;
    font-weight: bold;
    line-height: 1;
}

.em-modal-body {
    padding: 2rem;
    text-align: center;
}

.em-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

.em-modal-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.em-whatsapp-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    margin-top: 0;
}

.em-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #25d366;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.em-whatsapp-btn:hover {
    background: #1fad51;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.em-modal-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

.em-modal-close {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    min-width: 150px;
}

.em-modal-close:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.em-modal-close:active {
    transform: translateY(0);
}

/* Mensagens de Feedback */
.em-message {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.em-message.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.em-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Responsividade Melhorada */
@media (max-width: 768px) {
    .eventos-musicais-container {
        padding: 0 16px;
        margin-top: 24px;
    }

    .em-section {
        padding: 1.5rem;
    }

    .em-title {
        font-size: 2rem;
    }

    .em-music-list {
        grid-template-columns: 1fr;
    }

    .em-filter-input {
        width: 100%;
    }

    .em-filter-buttons {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        width: 100%;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .em-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}