/* ==========================================================================
   UMUMIY STILLAR
   ========================================================================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    overflow-x: hidden;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.hero-bg {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.88) 0%, rgba(241, 245, 249, 0.94) 100%),
                url('https://images.unsplash.com/photo-1461896836934-ffe607ba8211?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
}

.orange-glow {
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.35);
}

.orange-glow:hover {
    box-shadow: 0 15px 30px -5px rgba(249, 115, 22, 0.5);
}

/* ==========================================================================
   RASMLI KARTALAR KARUSELI (o'ngdan chapga avtomatik harakat)
   ========================================================================== */
:root {
    --card-navy: #0f172a;
    --card-red: #dc2626;
    --card-text-white: #ffffff;
    --card-text-muted: #94a3b8;
    --card-border-glass: rgba(255, 255, 255, 0.12);
    --card-border-red-glow: rgba(220, 38, 38, 0.35);
}

.cards-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 14px 0 35px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.cards-wrapper:active {
    cursor: grabbing;
}

.cards-track {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
}

.event-card {
    display: block;
    color: inherit;
    text-decoration: none;
    -webkit-user-drag: none;
    position: relative;
    width: 320px;
    height: 245px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--card-border-glass);
    transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.35);
    background: var(--card-navy);
}

.event-card:hover {
    border-color: var(--card-border-red-glow);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.25), 0 0 20px rgba(15, 23, 42, 0.4);
}

.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    filter: brightness(0.55) contrast(1.1);
}

.event-card:hover .card-bg-img {
    transform: scale(1.08);
}

.card-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.status-badge.live    { background: #10b981; color: #000; }
.status-badge.extreme { background: var(--card-red); color: #fff; }
.status-badge.night   { background: #a855f7; color: #fff; }
.status-badge.soon     { background: #f97316; color: #fff; }
.status-badge.finished { background: #f8fafc; color: #0f172a; }

.distance-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--card-text-white);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--card-text-white);
    margin-bottom: 6px;
    line-height: 1.25;
}

.location,
.date {
    font-size: 0.82rem;
    color: var(--card-text-muted);
    margin-bottom: 3px;
    font-weight: 500;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.participants {
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--card-text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-card:hover .action-btn {
    background: var(--card-red);
    border-color: var(--card-red);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.6);
}

@media (max-width: 600px) {
    .event-card {
        width: 280px;
        height: 230px;
    }
}

/* ==========================================================================
   THEME QOBIG'I (header/footer) — plugin sahifalarida Tailwind preflight
   o'chiq bo'lgani uchun faqat shu qism uchun minimal reset.
   :where() — spetsifiklik 0, Tailwind klasslari ustun turadi.
   ========================================================================== */
:where(.carawa-shell) *,
:where(.carawa-shell) *::before,
:where(.carawa-shell) *::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

:where(.carawa-shell) a {
    color: inherit;
    text-decoration: none;
}

:where(.carawa-shell) button {
    font: inherit;
    cursor: pointer;
    background-color: transparent;
}

:where(.carawa-shell) :where(ul, p, h3) {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ==========================================================================
   ICHKI SAHIFALAR (plugin sahifalari, postlar)
   ========================================================================== */
.carawa-content {
    background: #f8fafc;
}

.carawa-page-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 28px;
}

.carawa-entry-content {
    line-height: 1.7;
}

.carawa-entry-content > *:first-child {
    margin-top: 0;
}

.carawa-entry-content img {
    max-width: 100%;
    height: auto;
}

.carawa-entry-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.carawa-entry-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.carawa-entry-title a,
.carawa-back-link {
    color: #0f172a;
    text-decoration: none;
}

.carawa-entry-title a:hover,
.carawa-back-link:hover {
    color: #f97316;
}

.carawa-entry-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 10px;
}

@media (max-width: 600px) {
    .carawa-page-title {
        font-size: 1.75rem;
    }
}

/* Kartalar ekranga sig'sa — surish yo'q */
.cards-wrapper.is-static,
.cards-wrapper.is-static:active {
    cursor: default;
}

/* ==========================================================================
   RO'YXATDAN O'TISH FORMASI (registration.php)
   Bosh sahifa kartalari bilan bir xil: oq shisha kartalar, 16–24px
   radius, yumshoq soya, flame (to'q sariq) urg'u ranglari.
   ========================================================================== */
.reg-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-card:focus-within {
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.1);
}

/* backdrop-filter har bir kartani alohida qatlam qiladi — ochilgan ro'yxat
   keyingi karta ostida qolmasligi uchun shu kartani yuqoriga chiqaramiz */
.reg-card {
    position: relative;
}

.reg-card:focus-within,
.reg-card:has(.pick.is-open) {
    z-index: 20;
}

.reg-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 22px;
}

.reg-step {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px -4px rgba(249, 115, 22, 0.5);
}

.reg-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.reg-field[hidden] {
    display: none;
}

.reg-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
}

.reg-optional {
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.reg-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

select.reg-input {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    text-overflow: ellipsis;
}

.reg-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.reg-input:hover {
    border-color: #cbd5e1;
}

.reg-input:focus {
    background-color: #fff;
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

/* Segment tugmalar (jins, toifa, masofa) */
.reg-segment {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.reg-segment-3 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.reg-segment label {
    position: relative;
    cursor: pointer;
}

.reg-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-segment span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    transition: all 0.25s ease;
}

.reg-segment label:hover span {
    border-color: #cbd5e1;
    background: #fff;
}

.reg-segment input:checked + span {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 10px 20px -8px rgba(15, 23, 42, 0.45);
}

.reg-segment input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}

/* Shartli maydonlar silliq ochiladi */
.reg-conditional:not([hidden]) {
    animation: reg-reveal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes reg-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* Oferta checkbox */
.reg-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: #334155;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: border-color 0.25s ease;
}

.reg-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-check-box {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 7px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: transparent;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reg-check input:checked + .reg-check-box {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

.reg-check input:focus-visible + .reg-check-box {
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}

.reg-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 18px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

/* Xatolar */
.is-invalid .reg-input,
.is-invalid.reg-segment span,
.is-invalid.reg-check {
    border-color: #dc2626;
}

.reg-alert {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 600;
}

#carawaRegSubmit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Muvaffaqiyat */
.reg-summary {
    display: grid;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
}

.reg-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.reg-summary dt {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.reg-summary dd {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

/* Chapdagi tadbir kartasi */
.reg-event-card {
    width: 100%;
    height: 300px;
}

@media (max-width: 600px) {
    .reg-card {
        padding: 20px;
        border-radius: 20px;
    }

    .reg-event-card {
        width: 100%;
        height: 240px;
    }
}

/* ==========================================================================
   BAYROQLI QIDIRUVLI RO'YXAT (davlat, viloyat, operator kodi)
   ========================================================================== */
.pick-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.reg-field {
    position: relative;
}

.pick {
    position: relative;
    min-width: 0;
}

.pick[hidden] {
    display: none;
}

.pick-btn {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.pick-btn:hover {
    border-color: #cbd5e1;
}

.pick-btn:focus-visible,
.pick.is-open .pick-btn {
    outline: none;
    background: #fff;
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.pick-value,
.pick-placeholder {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pick-placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.pick-caret {
    position: absolute;
    right: 16px;
    font-size: 0.7rem;
    color: #64748b;
    transition: transform 0.25s ease;
}

.pick.is-open .pick-caret {
    transform: rotate(180deg);
}

.pick .fi {
    flex: 0 0 auto;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    background-size: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.pick-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 280px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    animation: reg-reveal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pick-panel[hidden] {
    display: none;
}

.pick-search {
    width: 100%;
    height: 42px;
    margin-bottom: 6px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
}

.pick-search:focus {
    border-color: #f97316;
    background: #fff;
}

.pick-list {
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    overscroll-behavior: contain;
}

.pick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pick-item[hidden] {
    display: none;
}

.pick-item:hover,
.pick-item.is-active {
    background: #f1f5f9;
}

.pick-item.is-selected {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

.pick-name {
    flex: 1;
    min-width: 0;
}

.pick-code {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

.pick-empty {
    padding: 14px 12px;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.pick-empty[hidden] {
    display: none;
}

/* Telefon: operator kodi + raqam bitta qatorda */
.reg-phone {
    display: grid;
    grid-template-columns: 136px 1fr;
    gap: 8px;
}

.pick-dial .pick-btn {
    padding: 0 30px 0 14px;
    gap: 8px;
}

.pick-dial .pick-value {
    overflow: visible;
}

.pick-dial .pick-caret {
    right: 12px;
}

.pick-dial .pick-panel {
    min-width: 300px;
}

.is-invalid .pick-btn {
    border-color: #dc2626;
}

@media (max-width: 600px) {
    .pick-panel {
        min-width: 0;
    }

    .pick-dial .pick-panel {
        min-width: calc(100vw - 72px);
    }
}

/* Kirish kodi (login.php) */
.reg-code-input {
    height: 58px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.5em;
    padding-left: calc(16px + 0.5em);
}
