/* Public server storefront */

.server-store-hero,
.server-store-section-card,
.server-store-package-card,
.server-store-modal-dialog,
.server-store-modal-close,
.server-store-logo-box,
.server-store-feedback,
.server-store-status-note,
.server-store-package-summary,
.server-store-inline-message {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
}

.server-store-hero {
    position: relative;
    background: var(--background);
    border: 0;
    border-radius: 0;
}

.server-store-hero-backdrop {
    display: none;
}

.server-store-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1480px;
    margin: 0 auto;
    padding: 48px 32px 28px;
}

.server-store-hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.server-store-hero-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.server-store-logo-box {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface);
    font-size: 2.25rem;
    font-weight: 800;
    font-family: var(--font-heading);
    overflow: hidden;
}

.server-store-logo-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
}

.server-store-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.server-store-title-row h1 {
    margin: 0;
    font-size: 32px;
}

.server-store-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--on-primary-container);
    font-weight: 700;
}

.server-store-lead {
    margin: 8px 0 0;
    color: var(--on-surface-variant);
    line-height: 1.6;
}

.server-store-shell {
    max-width: 1480px;
    margin: 24px auto 36px;
    padding: 0 32px;
}

.server-store-main-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.server-store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

.server-store-listing-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 2px;
}

.server-store-eyebrow {
    display: block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.server-store-listing-head h2 {
    margin: 0;
    color: var(--on-surface);
    font-family: var(--font-heading);
    font-size: 24px;
    line-height: 1.15;
}

.server-store-package-count-label {
    color: var(--on-surface-variant);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.server-store-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--outline-variant);
    padding-bottom: 12px;
}

.server-store-tab {
    background: transparent;
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
}

.server-store-tab:hover {
    color: var(--on-surface);
    border-color: var(--on-surface-variant);
    background: var(--surface-container);
}

.server-store-tab.active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}

.server-store-empty-card {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    padding: 24px;
    grid-column: 1 / -1;
}

.server-store-empty-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--on-surface);
}

.server-store-empty-card p {
    margin: 0;
    font-size: 14px;
    color: var(--on-surface-variant);
}

.server-store-section-card {
    padding: 24px;
}

.server-store-section-head {
    display: block;
    margin-bottom: 16px;
}

.server-store-section-head h2 {
    margin: 0;
    font-size: 24px;
}

.server-store-form-help,
.server-store-modal-copy {
    color: var(--on-surface-variant);
}

.server-store-status-note,
.server-store-feedback,
.server-store-inline-message {
    padding: 16px;
    line-height: 1.6;
}

.server-store-status-note {
    margin-bottom: 16px;
}

.server-store-feedback-success,
.server-store-inline-message-success,
.server-store-status-live {
    border-color: var(--tertiary-container);
    color: var(--on-tertiary-container);
}

.server-store-feedback-warning,
.server-store-inline-message-warning,
.server-store-status-queued {
    border-color: var(--warning-container);
    color: var(--on-warning-container);
}

.server-store-feedback-error,
.server-store-inline-message-error,
.server-store-status-setup-required {
    border-color: var(--error-container);
    color: var(--error);
}

.server-store-package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.server-store-package-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    min-height: 372px;
}

.server-store-package-card:hover {
    background: var(--surface-container);
    border-color: var(--outline);
    transform: translateY(-2px);
}

.server-store-package-image {
    height: 176px;
    background:
        radial-gradient(circle at 50% 42%, rgba(var(--primary-rgb), 0.14), transparent 38%),
        linear-gradient(180deg, var(--surface-container), var(--surface-container-low));
    border-bottom: 1px solid var(--outline-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.server-store-package-image > i {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--primary-rgb), 0.28);
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--on-surface-variant);
    font-size: 32px;
}

.server-store-package-image.has-image {
    background: var(--surface-container);
}

.server-store-package-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.server-store-package-details {
    padding: 20px 20px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.server-store-package-details h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.25;
    font-family: var(--font-heading);
    color: var(--on-surface);
}

.server-store-package-price {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 12px;
}

.server-store-package-details p {
    margin: 0;
    color: var(--on-surface-variant);
    line-height: 1.5;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.server-store-package-disabled-copy {
    color: var(--warning);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 12px;
}

.server-store-package-top {
    display: none;
}

.server-store-package-actions {
    padding: 0 20px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.server-store-package-actions .btn {
    width: 100%;
    justify-content: center;
}

.server-store-package-action-disabled,
.server-store-package-actions .btn:disabled {
    opacity: 0.78;
    cursor: not-allowed;
}

.server-store-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.server-store-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 14, 0.8);
}

.server-store-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 24px;
}

.server-store-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
    cursor: pointer;
}

.server-store-modal-close:hover {
    color: var(--on-surface);
    border-color: var(--outline);
    background: var(--surface-container);
}

.server-store-modal-title {
    margin: 0 0 8px;
    font-size: 24px;
}

.server-store-modal-copy {
    margin: 0 0 16px;
    line-height: 1.6;
}

.server-store-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.server-store-package-summary {
    padding: 16px;
}

.server-store-package-summary-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.server-store-package-summary-row img,
.server-store-package-summary-row > i {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--outline-variant);
    background: var(--surface-container);
}

.server-store-package-summary-row img {
    object-fit: cover;
    display: block;
}

.server-store-package-summary-row > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
    font-size: 26px;
}

.server-store-package-summary-title {
    font-weight: 700;
    color: var(--on-surface);
}

.server-store-package-summary-copy {
    margin-top: 4px;
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 1.55;
}

.server-store-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-store-form-field span {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
}

.server-store-input {
    background: var(--field-background);
    border: 1px solid var(--panel-border-strong);
    color: var(--on-surface);
    padding: 0.75rem 1.2rem;
    border-radius: var(--radius-md);
    width: 100%;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.server-store-input:focus {
    border-color: var(--focus-ring);
}

.server-store-form-help {
    font-size: 13px;
    line-height: 1.5;
}

.server-store-modal-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

body.server-store-modal-open {
    overflow: hidden;
}

.is-hidden {
    display: none !important;
}

.server-store-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    padding-top: 113px;
}

.server-store-widget {
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    padding: 26px 24px;
    text-align: center;
}

.server-store-widget h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--on-surface);
}

.server-store-widget p {
    margin: 0;
    font-size: 14px;
    color: var(--on-surface-variant);
    line-height: 1.6;
}

.server-store-disclosure-lead {
    margin-bottom: 12px !important;
}

.server-store-disclosure-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 1.6;
}

.server-store-disclosure-list li::marker {
    color: var(--primary);
}

.server-store-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.server-store-contact-links .btn {
    flex: 1 1 120px;
    font-size: 13px;
    padding: 8px 12px;
    justify-content: center;
}

.server-store-widget-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.server-store-widget-icon > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.checkout-icon {
    background: rgba(var(--primary-rgb), 0.14);
    border-color: rgba(var(--primary-rgb), 0.24);
    color: var(--on-primary-container);
}

.support-icon {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.24);
    color: var(--on-tertiary-container);
}

.disclosure-icon {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
}

.server-store-disclosure-widget {
    text-align: left;
}

.server-store-disclosure-widget .server-store-widget-icon {
    margin-left: 0;
    margin-right: 0;
}

@media (min-width: 1320px) {
    .server-store-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .server-store-package-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1680px) {
    .server-store-hero-content,
    .server-store-shell {
        max-width: 1760px;
    }

    .server-store-layout {
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .server-store-package-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.server-store-sidebar-legal {
    margin-top: -2px;
    padding: 0 14px;
    color: #7f8da3;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.server-store-sidebar-legal p {
    margin: 0;
}

.server-store-legal-footer {
    display: none;
}

.server-store-disclosure-list {
    list-style: none;
    padding-left: 0;
}

.server-store-disclosure-list li {
    position: relative;
    padding-left: 0;
}

.server-store-disclosure-list li::before {
    content: none;
}

@media (max-width: 900px) {
    .server-store-layout {
        grid-template-columns: 1fr;
    }

    .server-store-sidebar {
        position: static;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .server-store-hero-content {
        padding-top: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .server-store-shell {
        margin-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .server-store-hero-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .server-store-modal-actions {
        width: 100%;
    }

    .server-store-listing-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .server-store-modal-actions .btn,
    .server-store-package-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .server-store-section-card,
    .server-store-modal-dialog {
        padding: 1.1rem;
    }

}

.server-store-policy-footer {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding: 20px 24px;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    color: var(--on-surface-variant);
    font-size: 13px;
    line-height: 1.65;
}

.server-store-policy-footer p {
    margin: 0;
}

.server-store-policy-footer p:first-child {
    color: var(--on-surface);
    font-size: 14px;
}

.server-store-policy-footer strong {
    color: var(--on-surface);
}

.server-store-policy-footer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.server-store-policy-tax {
    color: var(--on-surface-variant);
}
