/* ==========================================================================
   SoccerGo Gift Card Redemption Widget
   ========================================================================== */

/* Reset — scoped to the widget only */
.sgr-widget *,
.sgr-widget *::before,
.sgr-widget *::after {
    box-sizing: border-box;
}

/* Container */
.sgr-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #EDF4FF;
    padding: 2rem 1rem;
}

.sgr-widget__inner {
    max-width: 560px;
    margin: 0 auto;
}

/* Card */
.sgr-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    padding: 2.5rem;
}

@media (max-width: 640px) {
    .sgr-card {
        padding: 1.5rem;
    }
}

/* ------------------------------------------------------------------
   Logo
   ------------------------------------------------------------------ */
.sgr-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sgr-logo__icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.sgr-logo__text {
    font-family: 'Raleway', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1B389C;
    line-height: 1;
}

/* ------------------------------------------------------------------
   Step progress indicator
   ------------------------------------------------------------------ */
.sgr-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.sgr-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: background-color 0.3s, color 0.3s;
}

.sgr-step-circle--completed {
    background-color: #2E7D32;
    color: #ffffff;
}

.sgr-step-circle--active {
    background-color: #1B389C;
    color: #ffffff;
}

.sgr-step-circle--inactive {
    background-color: #D9E4F5;
    color: #818181;
}

.sgr-step-connector {
    width: 48px;
    height: 2px;
    transition: background-color 0.3s;
}

.sgr-step-connector--completed {
    background-color: #2E7D32;
}

.sgr-step-connector--inactive {
    background-color: #D9E4F5;
}

/* ------------------------------------------------------------------
   Success pill
   ------------------------------------------------------------------ */
.sgr-success-pill {
    background-color: #E8F5E9;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sgr-success-pill__text {
    color: #2E7D32;
    font-size: 14px;
    font-weight: 500;
}

/* ------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------ */
.sgr-heading {
    font-family: 'Raleway', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    text-align: center;
    margin: 0 0 0.5rem;
}

.sgr-heading--left {
    font-family: 'Raleway', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 0.5rem;
    text-align: left;
}

.sgr-subtext {
    font-size: 14px;
    color: #818181;
    text-align: center;
    margin: 0 0 2rem;
}

.sgr-subtext--left {
    font-size: 14px;
    color: #818181;
    text-align: left;
    margin: 0 0 1.5rem;
}

/* ------------------------------------------------------------------
   Form elements
   ------------------------------------------------------------------ */
.sgr-form-group {
    margin-bottom: 1.5rem;
}

.sgr-label {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
    display: block;
    margin-bottom: 0.5rem;
}

.sgr-input {
    width: 100%;
    height: 56px;
    padding: 0 1rem;
    border: 1px solid #D9E4F5;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #1A1A1A;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.sgr-input::placeholder {
    color: #818181;
}

.sgr-input:focus {
    outline: none;
    border: 2px solid #418BF6;
    box-shadow: 0 0 0 3px rgba(65, 139, 246, 0.12);
}

.sgr-input--error {
    border: 2px solid #D32F2F !important;
}

.sgr-error-text {
    color: #D32F2F;
    font-size: 14px;
    margin-top: 0.5rem;
    display: none;
}

.sgr-error-text--visible {
    display: block;
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.sgr-btn-primary {
    width: 100%;
    height: 52px;
    background-color: #1B389C;
    color: #ffffff;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sgr-btn-primary:hover:not(:disabled) {
    background-color: #418BF6;
}

.sgr-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sgr-btn-select {
    min-width: 110px;
    height: 40px;
    background-color: #1B389C;
    color: #ffffff;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0 1rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sgr-btn-select:hover:not(:disabled) {
    background-color: #418BF6;
}

.sgr-btn-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sgr-text-link {
    color: #418BF6;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    display: block;
    margin-top: 1rem;
}

.sgr-text-link:hover {
    text-decoration: underline;
    color: #418BF6;
}

.sgr-back-link {
    color: #418BF6;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.sgr-back-link:hover {
    text-decoration: underline;
    color: #418BF6;
}

/* ------------------------------------------------------------------
   Category grid
   ------------------------------------------------------------------ */
.sgr-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .sgr-category-grid {
        grid-template-columns: 1fr;
    }
}

.sgr-category-card {
    background: #ffffff;
    border: 1px solid #D9E4F5;
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.sgr-category-card:hover {
    border: 2px solid #418BF6;
    box-shadow: 0 4px 16px rgba(65, 139, 246, 0.18);
}

.sgr-category-card--selected {
    background-color: #EDF4FF;
    border: 2px solid #1B389C !important;
}

.sgr-category-card--selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #1B389C;
    border-radius: 8px 0 0 8px;
}

.sgr-category-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 0.75rem;
    background-color: #EDF4FF;
}

.sgr-category-card__name {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 0.25rem;
}

.sgr-category-card__desc {
    font-size: 13px;
    color: #818181;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgr-category-card__action {
    font-size: 13px;
    color: #418BF6;
    font-weight: 500;
}

/* ------------------------------------------------------------------
   Event list
   ------------------------------------------------------------------ */
.sgr-event-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sgr-event-card {
    background: #ffffff;
    border: 1px solid #D9E4F5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sgr-event-card:hover {
    border: 2px solid #418BF6;
    box-shadow: 0 2px 8px rgba(65, 139, 246, 0.15);
}

.sgr-event-card--unavailable {
    opacity: 0.55;
}

/* Date badge */
.sgr-date-badge {
    width: 56px;
    height: 56px;
    background-color: #EDF4FF;
    border: 1px solid #D9E4F5;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sgr-date-badge--unavailable {
    background-color: #F5F5F5;
}

.sgr-date-badge__day {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #418BF6;
    text-transform: uppercase;
    line-height: 1;
}

.sgr-date-badge__number {
    font-family: 'Raleway', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1B389C;
    line-height: 1;
    margin: 2px 0;
}

.sgr-date-badge__month {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    color: #818181;
    line-height: 1;
}

/* Event info */
.sgr-event-info {
    flex: 1;
    min-width: 0;
}

.sgr-event-name {
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgr-event-location {
    font-size: 13px;
    color: #818181;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Unavailable badge */
.sgr-unavailable-badge {
    min-width: 110px;
    height: 40px;
    background-color: #F5F5F5;
    color: #818181;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* Empty state */
.sgr-empty-state {
    text-align: center;
    padding: 2rem 0;
    color: #818181;
    font-size: 15px;
}

/* Skeleton loading */
.sgr-skeleton {
    background: linear-gradient(90deg, #EDF4FF 25%, #D9E4F5 50%, #EDF4FF 75%);
    background-size: 200% 100%;
    animation: sgr-shimmer 1.4s infinite;
    border-radius: 6px;
}

@keyframes sgr-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.sgr-skeleton-card {
    height: 72px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

/* ------------------------------------------------------------------
   Confirming / redirect step
   ------------------------------------------------------------------ */
.sgr-confirming {
    text-align: center;
    padding: 3rem 0;
}

.sgr-success-icon {
    width: 64px;
    height: 64px;
    background-color: #2E7D32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: sgr-scale-in 0.3s ease-out;
}

@keyframes sgr-scale-in {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.sgr-confirming__heading {
    font-family: 'Raleway', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 0.75rem;
}

.sgr-confirming__text {
    font-size: 15px;
    color: #818181;
    margin: 0 0 2rem;
}

.sgr-progress-bar {
    width: 100%;
    height: 4px;
    background-color: #D9E4F5;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.sgr-progress-bar__fill {
    height: 100%;
    width: 0%;
    background-color: #1B389C;
    transition: width 0.1s linear;
}

.sgr-progress-bar__label {
    font-size: 12px;
    color: #818181;
}

/* ------------------------------------------------------------------
   Spinner
   ------------------------------------------------------------------ */
.sgr-spinner {
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: sgr-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes sgr-spin {
    to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------ */
.sgr-hidden {
    display: none !important;
}

.sgr-icon-sm {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.sgr-icon-md {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sgr-icon-lg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
