/* Modal de checkout — hereda colores del tema vía variables CSS si están definidas */
.ymt-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ymt-modal[hidden] {
    display: none;
}
.ymt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 22, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.ymt-modal-dialog {
    position: relative;
    background: var(--white, #fff);
    color: var(--ink, #1a1a1a);
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    padding: 32px 32px 28px;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    animation: ymt-fade-in .25s ease-out;
}
@keyframes ymt-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ymt-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #777;
    padding: 4px 10px;
    border-radius: 4px;
}
.ymt-modal-close:hover {
    background: #f3f3f3;
    color: #000;
}

.ymt-modal-title {
    margin: 0 0 4px;
    font-size: 22px;
    letter-spacing: 0.02em;
}
.ymt-modal-event {
    margin: 0 0 24px;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ymt-modal-status {
    text-align: center;
    padding: 30px 0 10px;
}
.ymt-modal-status h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.ymt-fs {
    border: 0;
    padding: 0;
    margin: 0 0 22px;
}
.ymt-fs > legend {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #444;
    margin-bottom: 10px;
    padding: 0;
}

/* Tipos de entrada */
.ymt-type {
    display: grid;
    grid-template-columns: 24px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ymt-type:hover {
    border-color: var(--ink, #1a1a1a);
}
.ymt-type input[type=radio] {
    margin: 0;
}
.ymt-type input[type=radio]:checked + .ymt-type-name {
    font-weight: 600;
}
.ymt-type.is-soldout {
    opacity: 0.55;
    cursor: not-allowed;
}
.ymt-type-name {
    font-size: 15px;
}
.ymt-type-price {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
.ymt-type-meta {
    color: #777;
    font-size: 12px;
    white-space: nowrap;
}

/* Inputs */
.ymt-qty,
.ymt-field input {
    width: 100%;
    border: 1px solid var(--ink, #1a1a1a);
    background: var(--white, #fff);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: inherit;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.ymt-qty {
    max-width: 100px;
}
.ymt-field input:focus,
.ymt-qty:focus {
    border-color: var(--ink, #1a1a1a);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.ymt-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.ymt-field > span {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}
.ymt-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ymt-row3 {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
}

/* Método de pago */
.ymt-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
}
.ymt-method:hover {
    border-color: var(--ink, #1a1a1a);
}

/* Consentimiento */
.ymt-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}
.ymt-consent input[type=checkbox] {
    margin-top: 3px;
}

/* Resumen + submit */
.ymt-summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 10px;
}
.ymt-summary-label {
    font-size: 14px;
    color: #555;
}
.ymt-summary-total {
    font-size: 22px;
    font-weight: 600;
}
.ymt-submit {
    width: 100%;
    margin-top: 10px;
    padding: 14px 20px;
    font-size: 15px;
    cursor: pointer;
}

/* Cupón de descuento */
.ymt-coupon-row {
    display: flex;
    gap: 8px;
}
.ymt-coupon-input {
    flex: 1;
    border: 1px solid var(--ink, #1a1a1a);
    background: var(--white, #fff);
    padding: 12px 14px;
    font: inherit;
    border-radius: 4px;
    box-sizing: border-box;
    text-transform: uppercase;
}
.ymt-coupon-apply {
    flex: 0 0 auto;
    white-space: nowrap;
    background: var(--sage-deep, #646B4F);
    color: #fff;
    border: 1px solid var(--sage-deep, #646B4F);
    border-radius: 4px;
    padding: 0 24px;
    font-family: 'Jost', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}
.ymt-coupon-apply:hover {
    background: var(--sage, #7C8466);
    border-color: var(--sage, #7C8466);
}
.ymt-coupon-apply:disabled {
    opacity: 0.6;
    cursor: default;
}
.ymt-coupon-msg {
    margin: 8px 0 0;
    font-size: 13px;
    min-height: 1em;
}
.ymt-coupon-msg.is-ok  { color: #2e7d32; }
.ymt-coupon-msg.is-err { color: #c62828; }
.ymt-discount-line { padding: 8px 0 0; border-top: 0; }
.ymt-discount-line .ymt-summary-total {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
}

/* Botón "Descargar entrada" en la pantalla de confirmación */
.ymt-modal-status .btn-fill {
    margin-top: 12px;
    text-decoration: none;
}

/* Honeypot */
.ymt-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Responsive */
@media (max-width: 540px) {
    .ymt-modal-dialog { padding: 20px 18px 16px; }
    .ymt-row2, .ymt-row3 { grid-template-columns: 1fr; }
    .ymt-type { grid-template-columns: 20px 1fr auto; }
    .ymt-type .ymt-type-meta { grid-column: 2 / -1; }
}
