/* generated by tools/recolor.py from the old stylesheet; edit the source, not this file */
/* ══════════════════════════════════════════════════════════════════════════════
   Store Addon — store.css
   Full light/dark theme support. Uses the same palette as the main site.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Page Layout ──────────────────────────────────────────────────────────── */
.store-page {
    padding: 40px 0 60px;
    min-height: 60vh;
}

.store-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.store-page-title {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgb(220, 211, 202);
    margin-bottom: 8px;
}

.store-page-subtitle {
    color: rgb(130, 160, 149);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* ── Category Tabs ────────────────────────────────────────────────────────── */
.store-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.store-tab {
    padding: 8px 22px;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: 1px solid rgba(96, 144, 126, 0.3);
    background: rgba(10, 15, 14, 0.55);
    color: rgb(130, 160, 149);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}

.store-tab:hover {
    background: rgba(64, 96, 84, 0.25);
    border-color: rgba(96, 144, 126, 0.6);
    color: rgb(164, 186, 178);
}

.store-tab.active {
    background: rgba(64, 96, 84, 0.4);
    border-color: rgba(112, 147, 135, 0.7);
    color: rgb(130, 250, 97);
}

/* ── Product Grid ─────────────────────────────────────────────────────────── */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ── Product Card ─────────────────────────────────────────────────────────── */
.store-card {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(72, 108, 95, 0.3);
    background: rgba(12, 19, 16, 0.85);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.store-card:hover {
    border-color: rgba(100, 150, 132, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.store-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    background: rgba(17, 26, 23, 0.8);
    padding: 8px;
}

.store-card-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(17, 26, 23, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-card-img-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.25;
    color: rgb(130, 160, 149);
}

.store-card-body {
    padding: 16px 16px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: rgb(201, 214, 209);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.store-card-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 2px;
    background: rgba(80, 120, 105, 0.25);
    border: 1px solid rgba(88, 132, 116, 0.4);
    color: rgb(141, 169, 159);
}

.store-card-sub-badge {
    font-size: 0.75rem;
    color: rgb(118, 152, 139);
    font-weight: 400;
}

.btn-store-details {
    width: 100%;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    border: 1px solid rgba(80, 120, 105, 0.3);
    background: transparent;
    color: rgb(100, 150, 132);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
    margin-top: 4px;
}

.btn-store-details:hover {
    background: rgba(64, 96, 84, 0.2);
    border-color: rgba(96, 144, 126, 0.5);
    color: rgb(147, 173, 164);
}

.store-card-footer {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(56, 84, 74, 0.25);
    gap: 10px;
}

.store-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgb(130, 250, 97);
}

.store-card-price .original {
    font-size: 0.8rem;
    color: rgb(100, 130, 119);
    text-decoration: line-through;
    margin-right: 4px;
    font-weight: 400;
}

.store-card-price .free {
    color: rgb(135, 165, 154);
}

.store-card-out-of-stock {
    font-size: 0.78rem;
    color: rgb(180, 90, 70);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-store-buy {
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    border: 1px solid rgba(112, 147, 135, 0.55);
    background: rgba(10, 15, 14, 0.7);
    color: rgb(141, 169, 159);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-store-buy:hover:not(:disabled) {
    background: rgba(64, 96, 84, 0.4);
    border-color: rgba(124, 156, 144, 0.75);
    color: rgb(130, 250, 97);
}

.btn-store-buy:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Loading / Error / Empty States ─────────────────────────────────────────── */
.store-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgb(115, 150, 137);
}

.store-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: block;
    opacity: 0.4;
}

.store-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(96, 144, 126, 0.15);
    border-top-color: rgb(135, 165, 154);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto 16px;
}

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

.store-error-msg {
    color: rgb(200, 110, 90);
    font-size: 0.9rem;
}

.store-no-config {
    max-width: 520px;
    margin: 0 auto;
    padding: 36px 28px;
    border: 1px dashed rgba(96, 144, 126, 0.3);
    border-radius: 6px;
    text-align: center;
}

.store-no-config h3 {
    color: rgb(189, 206, 200);
    margin-bottom: 12px;
}

.store-no-config p {
    color: rgb(125, 155, 144);
    font-size: 0.9rem;
    line-height: 1.6;
}

.store-no-config code {
    background: rgba(19, 28, 25, 0.8);
    border: 1px solid rgba(72, 108, 95, 0.4);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    color: rgb(152, 178, 168);
}

/* ── Overlay (checkout / full store embed) ─────────────────────────────────── */
.store-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.82);
    align-items: center;
    justify-content: center;
}

.store-overlay.open {
    display: flex;
}

.store-overlay-inner {
    width: min(960px, 96vw);
    height: min(760px, 92vh);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #0d1412;
    border: 1px solid rgba(80, 120, 105, 0.35);
}

.store-overlay-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(10, 15, 14, 0.95);
    border-bottom: 1px solid rgba(80, 120, 105, 0.25);
    flex-shrink: 0;
}

.store-overlay-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgb(147, 173, 164);
}

.store-overlay-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(147, 173, 164);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 3px;
    transition: color 0.15s;
}

.store-overlay-close:hover { color: rgb(210, 100, 80); }
.store-overlay-close svg { width: 20px; height: 20px; }

.store-overlay iframe {
    flex: 1;
    width: 100%;
    border: none;
}

.store-overlay-loading {
    position: absolute;
    inset: 48px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1412;
    flex-direction: column;
    gap: 12px;
    color: rgb(124, 156, 144);
    font-size: 0.9rem;
}

/* ── "External" fallback link inside overlay ─────────────────────────────── */
.store-overlay-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    height: 100%;
    padding: 40px;
    color: rgb(135, 165, 154);
}

.store-overlay-fallback a {
    color: rgb(141, 169, 159);
    font-weight: 700;
    text-decoration: underline;
}


/* ══════════════════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   ══════════════════════════════════════════════════════════════════════════════ */

[data-theme="light"] .store-page-title {
    color: #17231f;
}

[data-theme="light"] .store-page-subtitle {
    color: #426256;
}

[data-theme="light"] .store-tab {
    border-color: rgba(64, 96, 84, 0.4);
    background: rgba(220, 228, 225, 0.6);
    color: #314940;
}

[data-theme="light"] .store-tab:hover {
    background: rgba(181, 199, 192, 0.6);
    border-color: rgba(72, 108, 95, 0.7);
    color: #1c2924;
}

[data-theme="light"] .store-tab.active {
    background: rgba(135, 165, 154, 0.35);
    border-color: rgba(80, 120, 105, 0.8);
    color: #141e1a;
}

[data-theme="light"] .store-card {
    background: #f6f8f7;
    border-color: #b5c7c0;
}

[data-theme="light"] .store-card:hover {
    border-color: #88a69b;
    box-shadow: 0 6px 24px rgba(72, 108, 95, 0.12);
}

[data-theme="light"] .store-card-img-placeholder {
    background: #ecf0ef;
}

[data-theme="light"] .store-card-img-placeholder svg {
    color: #709387;
}

[data-theme="light"] .store-card-name {
    color: #17231f;
}

[data-theme="light"] .btn-store-details {
    border-color: rgba(64, 96, 84, 0.35);
    color: #3a584d;
}

[data-theme="light"] .btn-store-details:hover {
    background: rgba(92, 138, 121, 0.12);
    color: #1c2924;
}

[data-theme="light"] .store-card-footer {
    border-top-color: rgba(88, 132, 116, 0.2);
}

[data-theme="light"] .store-card-price {
    color: #32d006;
}

[data-theme="light"] .store-card-price .original {
    color: #809a90;
}

[data-theme="light"] .btn-store-buy {
    background: transparent;
    border-color: rgba(64, 96, 84, 0.6);
    color: #32d006;
}

[data-theme="light"] .btn-store-buy:hover:not(:disabled) {
    background: rgba(80, 120, 105, 0.15);
    border-color: rgba(72, 108, 95, 0.8);
    color: #1c2924;
}

[data-theme="light"] .store-state {
    color: #51796a;
}

[data-theme="light"] .store-no-config {
    border-color: rgba(80, 120, 105, 0.4);
}

[data-theme="light"] .store-no-config h3 {
    color: #17231f;
}

[data-theme="light"] .store-no-config p {
    color: #406054;
}

[data-theme="light"] .store-no-config code {
    background: #ecf0ef;
    border-color: rgba(80, 120, 105, 0.4);
    color: #32d006;
}

[data-theme="light"] .store-error-msg {
    color: rgb(160, 60, 50);
}

[data-theme="light"] .store-overlay-inner {
    background: #f6f8f7;
    border-color: rgba(80, 120, 105, 0.35);
}

[data-theme="light"] .store-overlay-bar {
    background: #ecf0ef;
    border-bottom-color: rgba(80, 120, 105, 0.3);
}

[data-theme="light"] .store-overlay-title {
    color: #2a4038;
}

[data-theme="light"] .store-overlay-loading {
    background: #f6f8f7;
    color: #375349;
}

/* ══════════════════════════════════════════════════════════════════════════════
   Product Detail Modal
   ══════════════════════════════════════════════════════════════════════════════ */

.store-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.82);
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px 40px;
    overflow-y: auto;
}

.store-detail-overlay.open {
    display: flex;
}

.store-detail-modal {
    width: min(820px, 100%);
    border-radius: 8px;
    background: #0f1613;
    border: 1px solid rgba(80, 120, 105, 0.35);
    overflow: hidden;
    margin: auto;
    position: relative;
}

/* ── Modal header bar ──────────────────────────────────────────────────────── */
.store-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(10, 15, 14, 0.95);
    border-bottom: 1px solid rgba(80, 120, 105, 0.2);
}

.store-detail-bar-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgb(135, 165, 154);
}

.store-detail-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(135, 165, 154);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 3px;
    transition: color 0.15s;
}

.store-detail-close:hover { color: rgb(210, 90, 70); }
.store-detail-close svg { width: 20px; height: 20px; }

/* ── Modal body ────────────────────────────────────────────────────────────── */
.store-detail-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
}

@media (max-width: 600px) {
    .store-detail-body {
        grid-template-columns: 1fr;
    }
}

/* Left: image + price/buy */
.store-detail-left {
    padding: 24px 20px;
    border-right: 1px solid rgba(80, 120, 105, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(8, 12, 11, 0.5);
}

.store-detail-img {
    width: 100%;
    border-radius: 4px;
    display: block;
    object-fit: contain;
    background: rgba(19, 28, 25, 0.6);
}

.store-detail-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgb(201, 214, 209);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Purchase type toggle */
.store-detail-type {
    display: flex;
    gap: 6px;
}

.store-detail-type-btn {
    flex: 1;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    border: 1px solid rgba(80, 120, 105, 0.3);
    background: rgba(10, 15, 14, 0.5);
    color: rgb(100, 150, 132);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.store-detail-type-btn.active,
.store-detail-type-btn:hover {
    background: rgba(56, 84, 74, 0.4);
    border-color: rgba(96, 144, 126, 0.6);
    color: rgb(130, 250, 97);
}

.store-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.store-detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(129, 250, 95);
}

.store-detail-price-orig {
    font-size: 0.9rem;
    color: rgb(100, 130, 119);
    text-decoration: line-through;
}

.store-detail-price-per {
    font-size: 0.8rem;
    color: rgb(100, 150, 132);
}

.store-detail-servers {
    font-size: 0.78rem;
    color: rgb(92, 138, 121);
    line-height: 1.6;
}

.store-detail-servers strong {
    color: rgb(135, 165, 154);
    display: block;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.72rem;
}

.btn-store-detail-buy {
    width: 100%;
    padding: 11px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 3px;
    border: 1px solid rgba(100, 150, 132, 0.6);
    background: rgba(48, 72, 63, 0.5);
    color: rgb(130, 250, 97);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-store-detail-buy:hover {
    background: rgba(64, 96, 84, 0.6);
    border-color: rgba(124, 156, 144, 0.8);
    color: rgb(130, 250, 97);
}

/* Right: description */
.store-detail-right {
    padding: 24px 24px 28px;
    overflow-y: auto;
    max-height: 80vh;
}

.store-detail-desc-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgb(88, 132, 116);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(80, 120, 105, 0.2);
}

/* PayNow description HTML content */
.store-detail-desc {
    font-size: 0.88rem;
    color: rgb(170, 190, 183);
    line-height: 1.7;
}

.store-detail-desc h1,
.store-detail-desc h2,
.store-detail-desc h3,
.store-detail-desc h4 {
    color: rgb(187, 203, 197);
    font-weight: 700;
    margin: 16px 0 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.store-detail-desc p {
    margin: 0 0 10px;
}

.store-detail-desc img {
    max-width: 100%;
    border-radius: 4px;
    margin: 8px 0;
    display: block;
}

.store-detail-desc ul,
.store-detail-desc ol {
    padding-left: 20px;
    margin: 0 0 10px;
}

.store-detail-desc li {
    margin-bottom: 4px;
}

.store-detail-desc strong {
    color: rgb(187, 203, 197);
}

/* Card cursor hint */
.store-card {
    cursor: pointer;
}

/* ── Light theme ────────────────────────────────────────────────────────────── */
[data-theme="light"] .store-detail-modal {
    background: #f6f8f7;
    border-color: rgba(80, 120, 105, 0.4);
}

[data-theme="light"] .store-detail-bar {
    background: #ecf0ef;
    border-bottom-color: rgba(80, 120, 105, 0.3);
}

[data-theme="light"] .store-detail-bar-title { color: #2a4038; }

[data-theme="light"] .store-detail-left {
    background: rgba(221, 229, 226, 0.4);
    border-right-color: rgba(80, 120, 105, 0.2);
}

[data-theme="light"] .store-detail-name { color: #17231f; }

[data-theme="light"] .store-detail-type-btn {
    border-color: rgba(64, 96, 84, 0.4);
    background: rgba(204, 216, 212, 0.5);
    color: #3a584d;
}

[data-theme="light"] .store-detail-type-btn.active,
[data-theme="light"] .store-detail-type-btn:hover {
    background: rgba(135, 165, 154, 0.3);
    border-color: rgba(72, 108, 95, 0.7);
    color: #1c2924;
}

[data-theme="light"] .store-detail-price { color: #32d006; }
[data-theme="light"] .store-detail-price-per { color: #476b5e; }
[data-theme="light"] .store-detail-servers { color: #416155; }
[data-theme="light"] .store-detail-servers strong { color: #22342d; }

[data-theme="light"] .btn-store-detail-buy {
    background: transparent;
    border-color: rgba(64, 96, 84, 0.6);
    color: #21322b;
}

[data-theme="light"] .btn-store-detail-buy:hover {
    background: rgba(80, 120, 105, 0.15);
    color: #16211d;
}

[data-theme="light"] .store-detail-right { background: #f6f8f7; }
[data-theme="light"] .store-detail-desc-heading { color: #3a584d; border-bottom-color: rgba(80, 120, 105, 0.25); }

[data-theme="light"] .store-detail-desc { color: #202f2a; }
[data-theme="light"] .store-detail-desc h1,
[data-theme="light"] .store-detail-desc h2,
[data-theme="light"] .store-detail-desc h3,
[data-theme="light"] .store-detail-desc h4 { color: #141e1a; }
[data-theme="light"] .store-detail-desc strong { color: #141e1a; }
