/**
 * CSS for Lotería Nacional Module.
 * Scoped under .lbuho- namespaces.
 */

/* Selection Grid Frontend */
.lbuho-selection-wrapper {
    margin: 20px 0;
    padding: 25px;
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lbuho-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    border-left: 4px solid #d4af37;
    padding-left: 10px;
    line-height: 1.2;
}

/* 5 Digits Input */
.lbuho-digits-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.lbuho-digit-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.lbuho-digit-input:focus {
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Number Search Section */
.lbuho-search-panel {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.lbuho-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.lbuho-search-row input[type="text"] {
    flex-grow: 1;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.lbuho-search-row select {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: white;
}

.lbuho-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lbuho-btn:hover {
    background: #1a252f;
}

.lbuho-btn-gold {
    background: #d4af37;
    color: #1a252f;
}

.lbuho-btn-gold:hover {
    background: #c29f2d;
}

/* Search results list */
.lbuho-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 15px;
}

.lbuho-number-pill {
    background: white;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lbuho-number-pill:hover, .lbuho-number-pill.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(212,175,55,0.2);
}

/* Ticket Type Selector */
.lbuho-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.lbuho-option-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.lbuho-option-card:hover {
    border-color: #cbd5e1;
}

.lbuho-option-card.active {
    border-color: #d4af37;
    background: #fefcf3;
}

.lbuho-option-card input[type="radio"] {
    display: none;
}

.lbuho-option-title {
    font-weight: 600;
    color: #1e293b;
    display: block;
    margin-bottom: 5px;
}

.lbuho-option-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* Purchase Section */
.lbuho-purchase-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.lbuho-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lbuho-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lbuho-qty-btn:hover {
    background: #f1f5f9;
}

.lbuho-qty-value {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

/* PREMIUM TICKET VISUAL REPRESENTATION */
/* PREMIUM TICKET VISUAL REPRESENTATION */
.lbuho-ticket-container {
    padding: 10px 0;
    max-width: 650px;
    width: 100%;
}

.lbuho-ticket {
    position: relative;
    width: 100%;
    aspect-ratio: 1.6;
    background-image: url('http://loteriaelbuhodelasuerte.es/wp-content/uploads/2026/07/fondo-billete-loteria.jpg') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Fallback for older browsers without aspect-ratio */
@supports not (aspect-ratio: 1.6) {
    .lbuho-ticket {
        height: 0;
        padding-bottom: 62.5%;
    }
}

/* Sorteo Name Overlay */
.lbuho-ticket-draw-name {
    position: absolute;
    top: 5.5%;
    left: 55%;
    font-size: 13px;
    font-style: italic;
    font-family: Georgia, serif;
    color: #4b5563;
    line-height: 1;
}

/* Sorteo Date Overlay */
.lbuho-ticket-draw-date {
    position: absolute;
    top: 48%;
    left: 35%;
    width: 44%;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    font-family: inherit;
    line-height: 1;
    letter-spacing: 0.5px;
}

/* Number Overlay Box (Top Right) */
.lbuho-ticket-number-box {
    position: absolute;
    top: 3.5%;
    left: 82.5%;
    width: 13.8%;
    height: 14.5%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.ticket-digit, .lbuho-ticket .lbuho-digit-input {
    width: 18% !important;
    height: 85% !important;
    border: none !important;
    background: transparent !important;
    color: #111827 !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
    outline: none !important;
    vertical-align: middle;
}

/* Serie Circular Overlay */
.lbuho-ticket-serie {
    position: absolute;
    top: 23%;
    left: 82.5%;
    width: 13.8%;
    height: 11%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    font-family: monospace;
    color: #1f2937;
}

/* Fracción Rectangular Overlay */
.lbuho-ticket-fraccion {
    position: absolute;
    top: 49.5%;
    left: 82.5%;
    width: 13.8%;
    height: 11%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    font-family: monospace;
    color: #1f2937;
}

/* Precio Rectangular Overlay */
.lbuho-ticket-price {
    position: absolute;
    top: 76.5%;
    left: 82.5%;
    width: 13.8%;
    height: 11%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    font-family: monospace;
    color: #1f2937;
}

/* Mode and Qty Pilled Overlays at the bottom middle */
.lbuho-ticket-mode-val {
    position: absolute;
    top: 80.5%;
    left: 50.5%;
    background: rgba(224, 242, 254, 0.95);
    border: 1.5px solid #0284c7;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    color: #0369a1;
    text-transform: uppercase;
    line-height: 1;
}

.lbuho-ticket-qty-val {
    position: absolute;
    top: 80.5%;
    left: 71.5%;
    font-size: 14px;
    font-weight: 800;
    color: #b45309;
    line-height: 1;
}

/* Barcode text overlay covering original 00000000 */
.lbuho-ticket-barcode-num {
    position: absolute;
    top: 89.5%;
    left: 42%;
    width: 32.5%;
    background: #e3f2fd;
    color: #1f2937;
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Responsive Font Scaling adjustments */
@media (max-width: 600px) {
    .lbuho-ticket-draw-name { font-size: 11px; }
    .lbuho-ticket-draw-date { font-size: 13px; }
    .ticket-digit, .lbuho-ticket .lbuho-digit-input { font-size: 20px !important; }
    .lbuho-ticket-serie, .lbuho-ticket-fraccion, .lbuho-ticket-price { font-size: 13px; }
    .lbuho-ticket-mode-val { font-size: 8px; }
    .lbuho-ticket-qty-val { font-size: 12px; }
    .lbuho-ticket-barcode-num { font-size: 9px; }
}

@media (max-width: 480px) {
    .lbuho-ticket-draw-name { font-size: 9px; }
    .lbuho-ticket-draw-date { font-size: 10px; }
    .ticket-digit, .lbuho-ticket .lbuho-digit-input { font-size: 16px !important; }
    .lbuho-ticket-serie, .lbuho-ticket-fraccion, .lbuho-ticket-price { font-size: 10px; }
    .lbuho-ticket-mode-val { font-size: 7px; padding: 2px 4px; }
    .lbuho-ticket-qty-val { font-size: 10px; }
    .lbuho-ticket-barcode-num { font-size: 8px; }
}

