/**
 * Tickvent Estilos de la Búsqueda y Descarga Pública de Entradas
 */

.tickvent-search-card {
    max-width: 540px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.tickvent-search-card * {
    box-sizing: border-box;
}

.search-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.search-header-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px auto;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-card-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.search-card-header .search-desc {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

.tickvent-form-field {
    margin-bottom: 20px;
}

.tickvent-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.input-with-icon input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Reto Matemático Simple */
.tickvent-math-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.tickvent-math-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.math-label-text {
    font-size: 13px;
    color: #475569;
}

.math-question {
    font-size: 16px;
    color: #0f172a;
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
}

.btn-refresh-math {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.2s;
}

.btn-refresh-math:hover {
    color: #2563eb;
    background: #e0e7ff;
}

.tickvent-spinning {
    animation: tickventSpin 0.6s linear infinite;
}

@keyframes tickventSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tickvent-math-field input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #ffffff;
}

.tickvent-math-field input[type="number"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Botón de Consulta */
.tickvent-form-actions {
    margin-top: 24px;
}

.tickvent-btn-search {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.1s;
}

.tickvent-btn-search:hover {
    background: #1d4ed8;
}

.tickvent-btn-search:active {
    transform: scale(0.99);
}

.tickvent-btn-search:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Feedback de Alerta */
.tickvent-feedback-msg {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.tickvent-feedback-msg.feedback-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    animation: shakeError 0.3s ease;
}

.tickvent-feedback-msg.feedback-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Contenedor del Ticket Resultante */
.tickvent-result-container {
    margin-top: 32px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 24px;
}

/* === Shortcode Logística: [tickvent_checkin] === */
.tickvent-checkin-card .tickvent-checkin-header {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 24px;
}

.tickvent-checkin-card .search-card-header h3 {
    color: #ffffff;
}

.tickvent-checkin-card .search-header-icon svg {
    stroke: #ffffff;
}

.tickvent-checkin-confirm-block {
    margin-top: 20px;
    text-align: center;
    padding: 0 24px 24px;
}

.tickvent-btn-confirm-entry {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px -2px rgba(22, 163, 74, 0.4);
    letter-spacing: 0.3px;
}

.tickvent-btn-confirm-entry:hover:not(:disabled) {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -4px rgba(22, 163, 74, 0.45);
}

.tickvent-btn-confirm-entry:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.tickvent-btn-warn {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 6px 16px -2px rgba(217, 119, 6, 0.4) !important;
}

.tickvent-checkin-ok {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 700;
}

.tickvent-checkin-result-msg {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.feedback-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* === Shortcode Creación de Asistente: [tickvent_registro] === */
.tickvent-create-card {
    max-width: 580px;
}

.tickvent-create-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 24px 20px;
    border-radius: 14px;
    margin: -32px -28px 24px -28px;
}

.tickvent-create-header h3 {
    color: #ffffff;
}

.tickvent-create-header .search-header-icon {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.tickvent-create-header .search-header-icon svg {
    stroke: #60a5fa;
}

.tickvent-create-header .search-desc {
    color: #94a3b8;
}

.tickvent-required {
    color: #ef4444;
    font-weight: bold;
}

.tickvent-optional {
    color: #94a3b8;
    font-size: 11px;
    font-weight: normal;
}

.tickvent-form-row {
    display: flex;
    gap: 12px;
}

.tickvent-col-40 {
    flex: 0 0 42%;
}

.tickvent-col-60 {
    flex: 1;
}

.tickvent-select-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tickvent-select-field:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tickvent-pin-field {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.tickvent-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-weight: 700;
}

.tickvent-field-help {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

.tickvent-btn-create {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    padding: 15px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.4);
}

.tickvent-btn-create:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -4px rgba(37, 99, 235, 0.45);
}

.tickvent-btn-create:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

@media (max-width: 580px) {
    .tickvent-search-card {
        margin: 16px auto;
        padding: 22px 16px;
        border-radius: 14px;
        width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    .search-card-header {
        margin-bottom: 20px;
    }
    .search-card-header h3 {
        font-size: 19px;
        line-height: 1.3;
    }
    .search-card-header .search-desc {
        font-size: 13px;
    }
    .search-header-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }
    .search-header-icon svg {
        width: 24px;
        height: 24px;
    }
    .input-with-icon input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }
    .input-with-icon svg {
        left: 12px;
        width: 18px;
        height: 18px;
    }
    .tickvent-form-row {
        flex-direction: column;
        gap: 0;
    }
    .tickvent-col-40, .tickvent-col-60 {
        flex: 1 1 100%;
    }
    .tickvent-btn-search,
    .tickvent-btn-confirm-entry,
    .tickvent-btn-create {
        padding: 13px 16px;
        font-size: 15px;
    }
    .tickvent-result-container {
        margin-top: 24px;
        padding-top: 18px;
    }
    .tickvent-create-header {
        margin: -22px -16px 20px -16px;
        padding: 18px 16px;
        border-radius: 14px 14px 0 0;
    }
    .tickvent-checkin-card .tickvent-checkin-header {
        margin: -22px -16px 20px -16px;
        padding: 18px 16px;
        border-radius: 14px 14px 0 0;
    }
    .tickvent-checkin-confirm-block {
        padding: 0 8px 16px;
    }
}
