/* ══════════════════════════════════════════
   Ka'umsa Haaraa — Frontend Styles
   Black & Gold Lottery Ticket Theme
   ══════════════════════════════════════════ */

:root {
    --kh-gold:         #D4AF37;
    --kh-gold-dark:   #AA7C11;
    --kh-gold-light:  #f0d060;
    --kh-bg:          #111111;
    --kh-card:        #1a1a1a;
    --kh-card2:       #222222;
    --kh-border:      rgba(212,175,55,0.25);
    --kh-text:        #ffffff;
    --kh-muted:       #aaaaaa;
    --kh-red:         #a83232;
    --kh-green:       #2a7a2a;
    --kh-radius:      12px;
    --kh-transition:  0.22s ease;
}

/* ── Reset wrapper ─────────────────────── */
#kh-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--kh-bg);
    color: var(--kh-text);
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}
#kh-wrapper *, #kh-wrapper *::before, #kh-wrapper *::after {
    box-sizing: border-box;
}

/* ── Hero ──────────────────────────────── */
.kh-hero {
    text-align: center;
    padding: 70px 20px 60px;
    background: radial-gradient(ellipse at top, #1d1a00 0%, var(--kh-bg) 70%);
    border-bottom: 1px solid var(--kh-border);
    width: 100% !important;
}
.kh-hero-badge {
    display: inline-block;
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--kh-border);
    color: var(--kh-gold);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.kh-hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 900;
    color: var(--kh-gold);
    letter-spacing: 3px;
    margin: 0 0 16px;
    text-shadow: 0 0 40px rgba(212,175,55,0.4);
}
.kh-hero-subtitle {
    font-size: clamp(15px, 2.5vw, 20px);
    color: var(--kh-muted);
    max-width: 100% !important;
    margin: 0 auto 24px;
    line-height: 1.7;
}
.kh-draw-date {
    display: inline-block;
    background: rgba(212,175,55,0.08);
    border: 1px solid var(--kh-border);
    color: var(--kh-gold-light);
    padding: 8px 20px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 15px;
}
.kh-price-badge {
    font-size: 16px;
    color: var(--kh-muted);
    margin-bottom: 30px;
}
.kh-price-badge strong { color: var(--kh-gold); }

/* ── Buttons ───────────────────────────── */
.kh-btn-main {
    display: inline-block;
    background: linear-gradient(135deg, var(--kh-gold-dark), var(--kh-gold));
    color: #111;
    padding: 14px 36px;
    border: none;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(212,175,55,0.35);
    transition: var(--kh-transition);
    letter-spacing: 0.5px;
}
.kh-btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(212,175,55,0.55);
    color: #000;
}
.kh-btn-main.kh-btn-full {
    display: block;
    width: 100%;
    border-radius: 10px;
    padding: 16px;
    font-size: 18px;
    margin-top: 10px;
}
.kh-btn-outline {
    background: transparent;
    border: 1px solid var(--kh-gold);
    color: var(--kh-gold);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--kh-transition);
}
.kh-btn-outline:hover {
    background: rgba(212,175,55,0.1);
}

/* ── Stats bar ─────────────────────────── */
.kh-stats-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    background: var(--kh-card);
    border-bottom: 1px solid var(--kh-border);
    width: 100% !important;
}
.kh-stat {
    flex: 1;
    text-align: center;
    padding: 20px 10px;
    border-right: 1px solid var(--kh-border);
    max-width: 100% !important;
}
.kh-stat:last-child { border-right: none; }
.kh-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--kh-gold);
    line-height: 1.2;
}
.kh-stat-label {
    display: block;
    font-size: 12px;
    color: var(--kh-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ── Section ───────────────────────────── */
.kh-section {
    padding: 50px 20px;
    max-width: 100% !important;
    margin: 0 !important;
    width: 100% !important;
}
.kh-section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--kh-gold);
    margin: 0 0 10px;
}
.kh-section-desc {
    text-align: center;
    color: var(--kh-muted);
    margin: 0 0 36px;
    font-size: 15px;
}

/* ── Card ──────────────────────────────── */
.kh-card {
    background: var(--kh-card);
    border: 1px solid var(--kh-border);
    border-radius: 18px;
    padding: 36px;
    width: 100% !important;
    max-width: 100% !important;
}

/* ── Alert ─────────────────────────────── */
.kh-alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 15px;
}
.kh-alert-success {
    background: rgba(42,122,42,0.15);
    border: 1px solid #2a7a2a;
    color: #4caf50;
}
.kh-alert-error {
    background: rgba(168,50,50,0.15);
    border: 1px solid var(--kh-red);
    color: #ff6b6b;
}

/* ── Loading ───────────────────────────── */
.kh-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--kh-muted);
    padding: 20px 0;
    font-size: 15px;
}
.kh-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(212,175,55,0.2);
    border-top-color: var(--kh-gold);
    border-radius: 50%;
    animation: kh-spin 0.8s linear infinite;
}
@keyframes kh-spin { to { transform: rotate(360deg); } }

/* ── Step header ───────────────────────── */
.kh-step { margin-bottom: 10px; width: 100% !important; }
.kh-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.kh-step-num {
    width: 32px;
    height: 32px;
    background: var(--kh-gold);
    color: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}
.kh-step-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--kh-gold);
}

/* ── Legend ────────────────────────────── */
.kh-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--kh-muted);
}
.kh-legend-item { display: flex; align-items: center; gap: 6px; }
.kh-dot {
    width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0;
}
.kh-dot-avail    { background: var(--kh-card2); border: 1px solid var(--kh-gold); }
.kh-dot-booked   { background: var(--kh-red); }
.kh-dot-selected { background: var(--kh-gold); }

/* ── Search ────────────────────────────── */
.kh-search-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.kh-search-wrap .kh-input { flex: 1; }

/* ── Ticket grid ───────────────────────── */
.kh-ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    background: #0d0d0d;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    scrollbar-width: thin;
    scrollbar-color: var(--kh-gold) #1a1a1a;
    width: 100% !important;
}
.kh-ticket-grid::-webkit-scrollbar { width: 6px; }
.kh-ticket-grid::-webkit-scrollbar-track { background: #1a1a1a; }
.kh-ticket-grid::-webkit-scrollbar-thumb { background: var(--kh-gold); border-radius: 3px; }

.kh-ticket-label {
    cursor: pointer;
    position: relative;
    display: block;
}
.kh-ticket-label input[type=radio] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.kh-ticket-box {
    padding: 9px 4px;
    text-align: center;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    transition: var(--kh-transition);
    user-select: none;
}
.kh-ticket-box.available {
    background: var(--kh-card2);
    border: 1px solid var(--kh-gold);
    color: white;
}
.kh-ticket-box.available:hover {
    background: rgba(212,175,55,0.15);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(212,175,55,0.3);
}
.kh-ticket-box.booked {
    background: var(--kh-red);
    border: 1px solid var(--kh-red);
    color: #ccc;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.7;
}
.kh-ticket-box.selected {
    background: var(--kh-gold) !important;
    color: #111 !important;
    box-shadow: 0 0 12px rgba(212,175,55,0.6);
    transform: scale(1.08);
}
.kh-ticket-box.highlight {
    box-shadow: 0 0 0 3px var(--kh-gold-light), 0 0 12px rgba(212,175,55,0.5);
    animation: kh-pulse 1s ease 2;
}
@keyframes kh-pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* ── Selected message ──────────────────── */
.kh-selected-msg {
    margin-top: 14px;
    font-weight: 700;
    font-size: 16px;
    color: var(--kh-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}
.kh-ticket-id-badge {
    font-size: 22px;
    background: var(--kh-card2);
    border: 1px solid var(--kh-gold);
    padding: 2px 14px;
    border-radius: 6px;
}

/* ── Divider ───────────────────────────── */
.kh-divider {
    border: 0;
    border-top: 1px solid var(--kh-border);
    margin: 28px 0;
    width: 100% !important;
}

/* ── Form fields ───────────────────────── */
.kh-field { margin-bottom: 18px; width: 100% !important; }
.kh-label {
    display: block;
    color: var(--kh-gold);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.kh-input {
    width: 100%;
    padding: 13px 16px;
    background: var(--kh-card2);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: var(--kh-transition);
    outline: none;
}
.kh-input:focus {
    border-color: var(--kh-gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.kh-input::placeholder { color: #555; }

/* ── Security notice ───────────────────── */
.kh-security-notice {
    background: rgba(168,50,50,0.12);
    border: 1px solid var(--kh-red);
    color: #ffb3b3;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
    width: 100% !important;
}

/* ── Payment cards ─────────────────────── */
.kh-payment-methods { display: flex; flex-direction: column; gap: 10px; width: 100% !important; }
.kh-payment-card {
    display: block;
    cursor: pointer;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: var(--kh-transition);
    overflow: hidden;
    width: 100% !important;
}
.kh-payment-card input[type=radio] { display: none; }
.kh-payment-card:has(input:checked) {
    border-color: var(--kh-gold);
    box-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.kh-pay-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0d0d0d;
    padding: 14px 16px;
    width: 100% !important;
}
.kh-pay-telebirr .kh-pay-inner { border-left: 5px solid #00adef; }
.kh-pay-cbe      .kh-pay-inner { border-left: 5px solid #800080; }
.kh-pay-awash    .kh-pay-inner { border-left: 5px solid #008000; }
.kh-pay-logo { font-size: 28px; }
.kh-pay-name { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.kh-pay-detail { font-size: 13px; color: var(--kh-muted); }
.kh-pay-number { font-size: 17px; font-weight: 700; color: #fff; margin-top: 4px; letter-spacing: 1px; }

/* ── Upload area ───────────────────────── */
.kh-upload-area {
    background: var(--kh-card2);
    border: 2px dashed var(--kh-gold);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--kh-transition);
    width: 100% !important;
}
.kh-upload-area:hover {
    background: rgba(212,175,55,0.04);
    border-color: var(--kh-gold-light);
}
.kh-upload-area p { color: var(--kh-muted); margin: 10px 0 16px; font-size: 14px; }

/* ── How it works ──────────────────────── */
.kh-how { border-top: 1px solid var(--kh-border); width: 100% !important; }
.kh-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100% !important;
}
.kh-how-step {
    background: var(--kh-card);
    border: 1px solid var(--kh-border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
}
.kh-how-icon { font-size: 36px; margin-bottom: 12px; }
.kh-how-step h3 { color: var(--kh-gold); font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.kh-how-step p  { color: var(--kh-muted); font-size: 13px; margin: 0; }

/* ── Footer ────────────────────────────── */
.kh-footer {
    background: #050505;
    border-top: 1px solid var(--kh-border);
    text-align: center;
    padding: 24px;
    color: var(--kh-muted);
    font-size: 13px;
    width: 100% !important;
}

/* ── Responsive ────────────────────────── */
@media (max-width: 600px) {
    .kh-card { padding: 20px 16px; }
    .kh-stats-bar { flex-wrap: wrap; }
    .kh-stat { min-width: 50%; border-bottom: 1px solid var(--kh-border); }
    .kh-ticket-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
    .kh-search-wrap { flex-direction: column; }
    .kh-pay-inner { flex-direction: column; text-align: center; }
}