/*
 * CPT Eventos — Public Styles
 * Estilos neutros para front-end. O tema pode sobrescrever com Tailwind.
 * Convenção: todas as classes começam com cpte-* para evitar colisão.
 * ============================================================ */

/* ── Container ───────────────────────────────────────────────── */
.cpte-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* ── Single Evento (fallback) ────────────────────────────────── */
.cpte-single-evento__header {
    margin-bottom: 24px;
}

.cpte-single-evento__title {
    font-size: clamp( 1.75rem, 4vw, 2.5rem );
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 700;
    color: #111827;
}

.cpte-single-evento__meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
    color: #374151;
}

.cpte-single-evento__meta li {
    line-height: 1.5;
}

.cpte-single-evento__meta strong {
    margin-right: 6px;
}

.cpte-single-evento__thumb {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
}

.cpte-single-evento__thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.cpte-single-evento__content {
    font-size: 1rem;
    line-height: 1.7;
    color: #1f2937;
    margin-bottom: 32px;
}

/* ── Formulário de Inscrição ─────────────────────────────────── */
.cpte-form-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin: 32px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.cpte-form-title {
    margin: 0 0 6px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

.cpte-form-subtitle {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.cpte-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cpte-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cpte-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cpte-form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.cpte-form-field input[type="text"],
.cpte-form-field input[type="email"],
.cpte-form-field input[type="tel"],
.cpte-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.cpte-form-field input:focus,
.cpte-form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, .15);
}

.cpte-form-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
}

.cpte-form-field--checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Honeypot — invisível para humanos */
.cpte-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Submit button */
.cpte-form-submit {
    margin-top: 8px;
}

/* ── Botões ──────────────────────────────────────────────────── */
.cpte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    font-family: inherit;
    line-height: 1;
}

.cpte-btn:active { transform: scale(.98); }

.cpte-btn--primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.cpte-btn--primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.cpte-btn--outline {
    background: transparent;
    color: #2271b1;
    border-color: #2271b1;
}

.cpte-btn--outline:hover {
    background: #2271b1;
    color: #fff;
}

.cpte-btn[disabled] {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── Feedback (sucesso/erro do AJAX) ─────────────────────────── */
.cpte-form-feedback {
    margin-top: 4px;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cpte-form-feedback:empty { display: none; }

.cpte-form-feedback.is-success,
.cpte-form-feedback.is-error {
    padding: 12px 14px;
    border-radius: 6px;
    margin-top: 8px;
}

.cpte-form-feedback.is-success {
    background: #f0fdf4;
    color: #14532d;
    border-left: 3px solid #16a34a;
}

.cpte-form-feedback.is-error {
    background: #fef2f2;
    color: #7f1d1d;
    border-left: 3px solid #d63638;
}

/* ── Alertas ─────────────────────────────────────────────────── */
.cpte-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cpte-alert p { margin: 6px 0 0; }
.cpte-alert p:last-child { margin-bottom: 0; }

.cpte-alert--info {
    background: #eff6ff;
    color: #1e3a8a;
    border-left: 4px solid #2271b1;
}

.cpte-alert--warning {
    background: #fffbeb;
    color: #78350f;
    border-left: 4px solid #f0b429;
}

.cpte-alert--error {
    background: #fef2f2;
    color: #7f1d1d;
    border-left: 4px solid #d63638;
}

.cpte-alert--info a {
    color: inherit;
    text-decoration: underline;
}

/* ── Lista de eventos (shortcode eventos_proximos) ───────────── */
.cpte-eventos-list {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( 320px, 1fr ) );
    gap: 20px;
    margin: 24px 0;
}

.cpte-evento-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.cpte-evento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.cpte-evento-card--cancelled { opacity: .65; }

.cpte-evento-card__img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.cpte-evento-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cpte-evento-card__body {
    display: flex;
    gap: 16px;
    padding: 18px;
    flex: 1;
}

.cpte-evento-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 10px 12px;
    flex-shrink: 0;
    line-height: 1;
    align-self: flex-start;
}

.cpte-evento-card__day {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.cpte-evento-card__month {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    margin-top: 4px;
    letter-spacing: .5px;
}

.cpte-evento-card__content { flex: 1; min-width: 0; }

.cpte-evento-card__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 600;
}

.cpte-evento-card__title a {
    color: #111827;
    text-decoration: none;
}

.cpte-evento-card__title a:hover { color: #2271b1; }

.cpte-evento-card__meta {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #4b5563;
}

.cpte-evento-card__btn {
    font-size: 0.85rem;
    padding: 8px 16px;
}

.cpte-evento-card__badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cpte-evento-card__badge--cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Responsivo ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cpte-form-grid { grid-template-columns: 1fr; }
    .cpte-evento-card__body { flex-direction: column; }
    .cpte-evento-card__date {
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
        align-self: stretch;
        justify-content: center;
    }
    .cpte-evento-card__day { font-size: 1.2rem; }
    .cpte-evento-card__month { margin-top: 0; }
}
