/* Palette reused from gg-loteria/gg-resultados (corporate colors already in
   production in the sibling widgets): dark green #1A382D, mid green
   #2A5747, brand yellow #F5C800 (hover #E0B400), light background #F4F6F9,
   border #E2E8F0, gray text #4A5568. */

.gg-history-empty {
    padding: 20px;
    text-align: center;
    color: #4A5568;
    background: #F4F6F9;
    border-radius: 8px;
}

.gg-history-wrap {
    max-width: 1000px;
    margin: 0 auto;
}

.gg-history-layout {
    display: flex;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 800px) {
    .gg-history-layout {
        flex-direction: column;
    }
}

.gg-history-calendar {
    flex: 0 0 300px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(26, 56, 45, 0.08);
}

@media (max-width: 800px) {
    .gg-history-calendar {
        flex: 1 1 auto;
    }
}

.gg-history-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gg-history-calendar__month {
    font-weight: 800;
    color: #1A382D;
    text-transform: capitalize;
}

.gg-history-calendar__nav {
    background: #F4F6F9;
    border: none;
    color: #1A382D;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gg-history-calendar__nav:hover {
    background: #EAF0EE;
}

.gg-history-calendar__weekdays,
.gg-history-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.gg-history-calendar__weekday {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4A5568;
    padding-bottom: 6px;
}

.gg-history-calendar__day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    background: transparent;
}

.gg-history-calendar__day--empty {
    pointer-events: none;
}

.gg-history-calendar__day--disabled {
    color: #CBD5E0;
    cursor: not-allowed;
}

.gg-history-calendar__day--enabled {
    color: #1A382D;
    background: #F4F6F9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gg-history-calendar__day--enabled:hover {
    background: #EAF0EE;
}

.gg-history-calendar__day--active {
    background: #1A382D !important;
    color: #FFFFFF !important;
}

/* Next draw's day: highlighted, but stays disabled (no result published
   yet) — the cursor and the button's "disabled" state don't change. */
.gg-history-calendar__day--next {
    background: #F5C800;
    color: #1A382D;
}

.gg-history-primary {
    flex: 1 1 auto;
    background: linear-gradient(135deg, #1A382D 0%, #2A5747 100%);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(26, 56, 45, 0.25);
}

.gg-history-primary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.gg-history-primary__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #F5C800;
}

.gg-history-primary__icon {
    flex-shrink: 0;
}

.gg-history-primary__pill {
    background: #F5C800;
    color: #1A382D;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 14px;
    border-radius: 20px;
}

/* Doble clase para ganarle en especificidad al selector de encabezados del tema, sin usar !important. */
.gg-history-primary .gg-history-primary__name {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: #FFFFFF;
}

.gg-history-primary__date {
    margin: 0 0 22px;
    font-weight: 600;
    opacity: 0.85;
}

.gg-history-primary__box {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.gg-history-primary__number-label,
.gg-history-primary__series-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4A5568;
}

.gg-history-primary__number {
    display: block;
    color: #1A382D;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.gg-history-primary__next {
    flex: 1 0 100%;
    order: 3;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2A5747;
}

.gg-history-primary__series-block {
    background: #F4F6F9;
    border-radius: 10px;
    padding: 10px 20px;
    text-align: center;
}

.gg-history-primary__series {
    display: block;
    color: #2A5747;
    font-size: 1.4rem;
    font-weight: 800;
}

.gg-history-list__title {
    color: #1A382D;
    font-size: 1.3rem;
    margin: 0 0 16px;
}

.gg-history-list__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gg-history-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

@media (max-width: 600px) {
    .gg-history-item {
        flex-wrap: wrap;
    }
}

.gg-history-item__date {
    flex: 0 0 90px;
    text-align: center;
    padding-right: 20px;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
}

.gg-history-item__weekday {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4A5568;
}

.gg-history-item__day {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1A382D;
    line-height: 1.1;
}

.gg-history-item__month-year {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4A5568;
    text-transform: capitalize;
}

.gg-history-item__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gg-history-item__name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4A5568;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gg-history-item__number {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1A382D;
}

.gg-history-item__series {
    flex: 0 0 auto;
    background: #F4F6F9;
    border-radius: 8px;
    padding: 8px 18px;
    text-align: center;
}

.gg-history-item__series-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4A5568;
}

.gg-history-item__series-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #2A5747;
}
