/* ============================================================
   Tvt.Misc.CuponPage - Estilos de la página pública de cupones
   Diseño tipo ticket/boleto. Sin dependencias externas.
   ============================================================ */

.cupon-page .cupon-subtitle {
    text-align: center;
    color: #666;
    margin: 0 auto 25px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------- Buscador ---------- */
.cupon-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    max-width: 560px;
}

.cupon-search-input {
    flex: 1 1 260px;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cupon-search-input:focus {
    border-color: #4b8df8;
    box-shadow: 0 0 0 3px rgba(75, 141, 248, .15);
}

.cupon-search-btn {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.cupon-search-clear {
    font-size: 14px;
    color: #777;
    text-decoration: underline;
    white-space: nowrap;
}

/* ---------- Estado vacío ---------- */
.cupon-empty {
    text-align: center;
    padding: 48px 20px;
    color: #888;
    font-size: 16px;
    border: 1px dashed #dcdcdc;
    border-radius: 12px;
    background: #fafafa;
}

/* ---------- Cuadrícula ---------- */
.cupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-top: 10px;
}

/* ---------- Ticket ---------- */
.cupon-ticket {
    position: relative;
    display: flex;
    min-height: 150px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.cupon-ticket:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

/* Sección izquierda: valor destacado */
.cupon-ticket-left {
    flex: 0 0 122px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #ff5a5f 0%, #f0353b 100%);
}

.cupon-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;
    word-break: break-word;
}

.cupon-value-tag {
    font-size: 40px;
}

.cupon-value-suffix {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    opacity: .95;
}

/* Línea perforada entre secciones */
.cupon-ticket-left::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 122px;
    border-left: 2px dashed rgba(0, 0, 0, .14);
}

/* Muescas (notch) superior e inferior, estilo boleto */
.cupon-ticket::before,
.cupon-ticket::after {
    content: "";
    position: absolute;
    left: 111px;
    width: 20px;
    height: 20px;
    background: #f7f7f7; /* debe coincidir con el fondo de la página */
    border-radius: 50%;
    z-index: 2;
}

.cupon-ticket::before {
    top: -10px;
}

.cupon-ticket::after {
    bottom: -10px;
}

/* Sección derecha: detalle */
.cupon-ticket-right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 14px 22px;
    min-width: 0;
}

.cupon-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cupon-type {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.cupon-code-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.cupon-code-label {
    font-size: 12px;
    color: #888;
}

.cupon-code {
    font-family: "Courier New", monospace;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    color: #222;
    padding: 3px 8px;
    background: #f3f3f3;
    border: 1px dashed #c6c6c6;
    border-radius: 6px;
}

.cupon-copy {
    border: 0;
    background: transparent;
    color: #4b8df8;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    text-decoration: underline;
}

.cupon-copy.cupon-copied {
    color: #2faf55;
    text-decoration: none;
    font-weight: 700;
}

.cupon-expiry {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.cupon-apply-form {
    margin-top: auto;
}

.cupon-apply-btn {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

/* ---------- Enlace en el footer ---------- */
.cupon-footer-link {
    margin: 6px 0;
}

.cupon-footer-link a {
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .cupon-grid {
        grid-template-columns: 1fr;
    }

    .cupon-ticket-left {
        flex-basis: 100px;
    }

    .cupon-ticket-left::after {
        left: 100px;
    }

    .cupon-ticket::before,
    .cupon-ticket::after {
        left: 89px;
    }

    .cupon-value {
        font-size: 26px;
    }
}
