/* ==========================================================================
   1. CONTENEDOR PRINCIPAL Y GENERALES
   ========================================================================== */
.yrt-front-container {
    width: 100%;
    margin: 40px auto;
    padding: 0;
    color: #374151;
    box-sizing: border-box;
}

.yrt-front-container * {
    box-sizing: border-box;
}

.yrt-front-container .yrt-text-center { text-align: center; }
.yrt-front-container .yrt-mb-8 { margin-bottom: 32px; }
.yrt-front-container .yrt-mt-4 { margin-top: 16px; }
.yrt-front-container .yrt-uppercase { text-transform: uppercase; }

/* ==========================================================================
   2. DISEÑO DE REGALO (LAZOS Y CINTAS)
   ========================================================================== */
.yrt-front-container .yrt-gift-wrapper {
    position: relative;
    padding-top: 64px;
}

.yrt-front-container .yrt-gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, #801010, #A01515, #801010);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 0;
}

.yrt-front-container .yrt-gift-ribbon-h {
    position: absolute;
    top: 120px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #801010, #A01515, #801010);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 0;
}

.yrt-front-container .yrt-ribbon-bow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    color: #A01515;
    font-size: 96px;
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.2));
}

/* ==========================================================================
   3. ESTRUCTURA DEL FORMULARIO Y CAJAS
   ========================================================================== */
.yrt-front-container .yrt-form-container {
    position: relative;
    z-index: 10;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 8px solid white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.yrt-front-container .yrt-form-content {
    position: relative;
    z-index: 10;
    padding: 32px;
}

.yrt-front-container .yrt-inner-box {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
}

.yrt-front-container .yrt-lucky-form > * + * {
    margin-top: 24px;
}

.yrt-front-container .yrt-form-grid {
    display: grid;
    gap: 24px;
}

/* ==========================================================================
   4. CAMPOS DE ENTRADA (INPUTS, LABELS, ICONS)
   ========================================================================== */
.yrt-front-container .yrt-field-group { position: relative; }

.yrt-front-container .yrt-field-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

.yrt-front-container .yrt-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.yrt-front-container .yrt-input-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
}

.yrt-front-container .yrt-ticket-input {
    width: 100%;
    padding: 12px 16px !important;
    padding-left: 40px !important;
    border-radius: 8px !important;
    border: 2px dashed #e5e7eb !important;
    background: #fffdf0 !important;
    color: #374151 !important;
    font-weight: 700 !important;
    font-family: inherit;
    transition: all 0.3s ease;
}

.yrt-front-container input[type="file"] {
    width: 100%;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: 2px dashed #e5e7eb !important;
    background: #fffdf0 !important;
    color: #374151 !important;
    font-weight: 700 !important;
    line-height: normal !important;
    font-family: inherit;
}

.yrt-front-container select.yrt-ticket-input {
    appearance: none;
    cursor: pointer;
}

.yrt-front-container textarea.yrt-ticket-input {
    padding-left: 16px;
    resize: none;
}

.yrt-front-container .yrt-ticket-input:focus {
    border-color: #FFD700;
    background: white;
    outline: none;
}

.yrt-front-container .yrt-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* ==========================================================================
   5. BOTONES Y EFECTOS
   ========================================================================== */
.yrt-front-container .yrt-btn-win {
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    color: #4a3701;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    box-shadow: 0 6px 0 #8d6708;
    transition: all 0.1s;
}

.yrt-front-container .yrt-btn-win:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #8d6708;
}

.yrt-front-container .yrt-shine-effect {
    position: relative;
    overflow: hidden;
}

.yrt-front-container .yrt-shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    animation: yrt-shine 3s infinite;
}

@keyframes yrt-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ==========================================================================
   6. SECCIÓN DE PAGO (YAPE / QR)
   ========================================================================== */
.yrt-payment-qr-wrap {
    background: linear-gradient(135deg, #73318e 0%, #4a148c 100%);
    color: white;
    padding: 30px 24px;
    text-align: center;
    border-radius: 28px;
    box-shadow: 0 15px 35px rgba(74, 20, 140, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(115, 49, 142, 0.05);
}

.yrt-qr-container {
    max-width: 200px;
    height: auto;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.yrt-payment-qr-wrap .payment-detail-qr {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.yrt-payment-qr-wrap .yrt-title-qr {
    background-color: #f97316;
    font-size: 14px;
    padding: 3px 15px;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    color: #fff;
    border-radius: 50px;
}

.yrt-payment-qr-wrap .price-tag {
    font-family: 'Lexend', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #00e3cc;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 8px 0 30px 0;
}

.yrt-yape-number {
    font-size: 28px;
    font-weight: 900;
    color: #fcd34d;
    letter-spacing: 1px;
}

.yrt-payment-qr-meta {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.yrt-payment-qr-meta .yrt-yape-number-line,
.yrt-payment-qr-meta .yrt-yape-owner-line {
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
}

.yrt-payment-qr-meta .yrt-yape-number-line strong,
.yrt-payment-qr-meta .yrt-yape-owner-line strong {
    font-weight: 800;
}

.yrt-copy-yape-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 320px);
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: #f97316;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.yrt-copy-yape-btn:hover,
.yrt-copy-yape-btn:focus {
    background: #ea580c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.33);
    outline: none;
}

.yrt-copy-yape-btn.is-copied {
    background: #10b981;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

/* ==========================================================================
   7. PREVISUALIZACIÓN Y TEXTOS DE AYUDA
   ========================================================================== */
.yrt-front-container .yrt-total-preview-box {
    min-height: 50px;
    padding: 12px 16px 12px 40px;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
    background: #fffdf0;
    color: #374151;
    font-weight: 700;
}

.yrt-front-container .yrt-total-preview {
    display: inline-block;
    width: 100%;
    line-height: 1.2;
}

.yrt-inner-box .yrt-detail-avise {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 24px;
    text-align: center;
}

.yrt-inner-box .yrt-detail-avise span {
    display: block;
    font-size: 18px;
    color: #334155;
    line-height: 1.4;
}

.yrt-inner-box .yrt-front-subtext {
    font-size: 11px;
    color: #64748b;
    margin: 10px 0 0 0;
    line-height: normal;
}

.yrt-terms {
    line-height: 1.2;
    font-size: 14px;
}

.yrt-terms p {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 0;
    margin-block-end: 0;
    text-align: center;
}

.yrt-front-container .yrt-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 15px;
    margin-top: 20px;
}

/* ==========================================================================
   8. ALERTAS Y MENSAJES DE ESTADO
   ========================================================================== */
.yrt-alert {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    width: 100%;
    border-left: 6px solid #e11d48;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: premiumIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.yrt-error {
    background: linear-gradient(to right, #fff5f5, #ffffff);
}

.yrt-error::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-right: 16px;
    flex-shrink: 0;
    background-color: #ffe4e6;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23e11d48'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

.yrt-dni-limit-message{
    margin-top:8px;
    font-size:13px;
    line-height:1.45;
    border-radius:10px;
    padding:10px 12px;
}
.yrt-dni-limit-message.is-info{ background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.yrt-dni-limit-message.is-warning{ background:#fffbeb; color:#b45309; border:1px solid #fcd34d; }
.yrt-dni-limit-message.is-error{ background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }

@keyframes premiumIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.yrt-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* ==========================================================================
   9. RESULTADOS / TICKETS GENERADOS
   ========================================================================== */
.yrt-front-container .yrt-results { margin-top: 60px; }
.yrt-front-container .yrt-order-group { margin-bottom: 40px; }
.yrt-front-container .yrt-order-group-head { border-bottom: 3px solid #A01515; padding-bottom: 12px; margin-bottom: 24px; }
.yrt-front-container .yrt-order-group-head h3 { color: #A01515; font-weight: 900; text-transform: uppercase; font-style: italic; margin-bottom: 8px; font-size: 22px; }
.yrt-front-container .yrt-order-group-head p { font-size: 13px; color: #6b7280; margin: 2px 0; }

.yrt-front-container .yrt-order-card {
    background: white;
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.yrt-front-container .yrt-order-card::before,
.yrt-front-container .yrt-order-card::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: #f3f4f6;
    border: 2px dashed #e5e7eb;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.yrt-front-container .yrt-order-card::before { left: -12px; }
.yrt-front-container .yrt-order-card::after { right: -12px; }

.yrt-front-container .yrt-order-card p { margin-bottom: 10px; font-size: 14px; line-height: 1.5; }
.yrt-front-container .yrt-order-card strong { color: #9ca3af; font-weight: 700; text-transform: uppercase; font-size: 11px; display: inline-block; width: 100px; }

.yrt-front-container .yrt-order-card .yrt-status-icon { color: #10b981; margin-right: 4px; }
.yrt-front-container .yrt-order-card .yrt-origin-icon { color: #2563eb; margin-right: 4px; }

.yrt-front-container .yrt-order-card .yrt-tickets-list {
    background: #fffdf0;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    color: #A01515;
    border: 1px solid #FFD700;
    display: inline-block;
    margin-top: 5px;
}

.yrt-front-container .yrt-order-card .yrt-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.yrt-front-container .yrt-button-mini {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    color: #4a3701;
    box-shadow: 0 4px 0 #8d6708;
}

.yrt-front-container .yrt-button-mini.alt {
    background: #A01515;
    color: white;
    box-shadow: 0 4px 0 #600d0d;
}

/* ==========================================================================
   10. CUENTA REGRESIVA
   ========================================================================== */
.yrt-front-container .yrt-countdown-banner {
    background-color: #A01515;
    color: white;
    padding: 24px 16px;
    width: 100%;
    text-align: center;
    border-bottom: 4px solid #FFD700;
    margin-top: 20px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.yrt-front-container .yrt-countdown-container { max-width: 672px; margin: 0 auto; }
.yrt-front-container .yrt-countdown-label { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 16px; letter-spacing: 1.5px; color: #FFD700; margin-top: 0; }
.yrt-front-container .yrt-countdown { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.yrt-front-container .yrt-count-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    min-width: 80px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.yrt-front-container .yrt-count-item span { display: block; font-size: 28px; font-weight: 900; line-height: 1; margin-bottom: 4px; color: white; }
.yrt-front-container .yrt-count-item small { display: block; font-size: 10px; text-transform: uppercase; font-weight: 700; color: #FFD700; opacity: 0.9; }

/* ==========================================================================
   11. FOOTER Y SOCIAL
   ========================================================================== */
.yrt-front-container .yrt-footer-links { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.yrt-front-container .yrt-social-btn {
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.yrt-front-container .yrt-social-btn:hover { transform: translateY(-2px); }
.yrt-front-container .yrt-bg-whatsapp { background-color: #22c55e; }
.yrt-front-container .yrt-bg-whatsapp:hover { background-color: #16a34a; }
.yrt-front-container .yrt-bg-facebook { background-color: #2563eb; }
.yrt-front-container .yrt-bg-facebook:hover { background-color: #1d4ed8; }

.yrt-front-container .yrt-copyright { text-align: center; color: #9ca3af; font-size: 14px; margin-top: 48px; font-weight: 500; }
.yrt-front-container .yrt-star-icon { color: #FFD700; margin: 0 4px; }

/* ==========================================================================
   12. ESTADOS DE VENTA / ETIQUETAS
   ========================================================================== */
.yrt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: normal;
}

.yrt-status-ventas_abiertas, .yrt-status-approved { background: #ecfdf5; color: #047857; border-color: #a7f3d0 }
.yrt-status-ventas_cerradas { background: #fffbeb; color: #b45309; border-color: #fde68a }
.yrt-status-sorteo_realizado, .yrt-status-rejected { background: #f3f4f6; color: #374151; border-color: #d1d5db }
.yrt-status-proximamente, .yrt-status-pending { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe }

/* ==========================================================================
   13. BLOQUEO DE FORMULARIO (WORDPRESS)
   ========================================================================== */
.yrt-form-blocked {
    position: relative;
    width: 100%;
    display: block; 
    text-align: center;
    min-height: 250px;
    padding: 90px 45px; 
    box-sizing: border-box;
    background-color: #ffffff;
    background-image: 
        radial-gradient(#fcd34d 1px, transparent 1px),
        radial-gradient(#fbbf24 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    border: 2px solid #f59e0b;
    border-radius: 15px;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.2), inset 0 0 0 10px #fff;
    color: #78350f;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.08'%3E%3Cpath d='m3 11 18-5v12L3 13v-2z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px bottom 15px;
    background-size: 120px;
    background-attachment: local;
}

.yrt-form-blocked img.emoji {
    display: inline-block !important;
    vertical-align: middle !important;
    height: 1.2em !important;
    width: 1.2em !important;
    margin: 0 5px !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: none !important;
}

.yrt-form-blocked::before, .yrt-form-blocked::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #fcf8f1;
    border: 2px solid #f59e0b;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.yrt-form-blocked::before { left: -17px; }
.yrt-form-blocked::after { right: -17px; }

.yrt-form-blocked-header {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: #e11d48;
    color: white;
    padding: 6px 25px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
}

.yrt-order-form.yrt-has-dni-block .yrt-copy-yape-btn,
.yrt-order-form.yrt-has-dni-block input[name="payment_proof"],
.yrt-order-form.yrt-has-dni-block button[type="submit"]{
    opacity:.7;
}

/* ==========================================================================
   14. MEDIA QUERIES (TABLET Y MÓVIL)
   ========================================================================== */

/* Tablet (768px o más) */
@media (min-width: 768px) {
    .yrt-front-container .yrt-form-content { padding: 48px; }
    .yrt-front-container .yrt-form-grid { grid-template-columns: 1fr 1fr; }
}

/* Móvil (Específicos para pantallas pequeñas) */
@media (max-width: 500px) {
    .yrt-form-blocked {
        font-size: 1.1rem;
        min-height: 230px;
        padding: 70px 30px;
        background-size: 90px, 40px 40px, 20px 20px;
    }
    .yrt-front-container {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        /* Opcional: Asegúrate de que no haya scroll horizontal indeseado */
        box-sizing: border-box;
    }
    .yrt-front-container .yrt-form-container {
        border: 2px solid white;
    }
    .yrt-front-container .yrt-form-content {
        padding: 5px;
    }
    .yrt-front-container .yrt-inner-box {
        padding: 35px 10px;
        padding-top: 35px;
        border: 0px solid #f3f4f6;
    }
}
