/*
 * AweCommerce front-end styles. Scoped under `.awc-frontend` so we
 * never leak into other parts of the theme.
 *
 * Print + minimal — themes will override most of this. We optimise
 * for "looks reasonable on a clean theme without any work".
 */
.awc-frontend { font-family: inherit; color: inherit; }
.awc-frontend * { box-sizing: border-box; }

.awc-frontend .awc-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 0 0 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.awc-frontend .awc-muted { color: #6b7280; font-size: 13px; }

.awc-frontend .awc-pricing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 0 0 24px;
}
.awc-frontend .awc-pricing-tier {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px 20px;
    text-align: center;
}
.awc-frontend .awc-pricing-tier h3 { margin: 0 0 4px; font-size: 16px; }
.awc-frontend .awc-pricing-title a,
.awc-frontend .awc-pricing-description-link {
    color: inherit;
    text-decoration: none;
}
.awc-frontend .awc-pricing-title a:hover,
.awc-frontend .awc-pricing-description-link:hover {
    text-decoration: underline;
}
.awc-frontend .awc-pricing-tier .awc-pricing-amount {
    font-size: 32px;
    font-weight: 700;
    margin: 12px 0 4px;
    color: #1f2937;
}
.awc-frontend .awc-pricing-tier .awc-pricing-cadence {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}
.awc-frontend .awc-pricing-tier .awc-pricing-trial {
    font-size: 12px;
    color: #1f2937;
    background: #fef3c7;
    border-radius: 9999px;
    padding: 2px 10px;
    display: inline-block;
    margin: 0 0 12px;
}
.awc-frontend .awc-price-select-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 14px;
    text-align: left;
}
.awc-frontend .awc-price-select-field span {
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
}
.awc-frontend .awc-price-select-field select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    padding: 9px 10px;
}
.awc-frontend .awc-price-select-field select:focus {
    border-color: #2563eb;
    outline: 2px solid #bfdbfe;
}
.awc-frontend .awc-pricing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.awc-frontend .awc-purchase-options {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
    margin: 18px 0;
    background: #ffffff;
}
.awc-frontend .awc-purchase-options fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 14px;
}
.awc-frontend .awc-purchase-options legend {
    font-weight: 700;
    margin: 0 0 10px;
    color: #1f2937;
}
.awc-frontend .awc-price-choice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin: 0 0 8px;
    cursor: pointer;
}
.awc-frontend .awc-price-choice:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.awc-frontend .awc-price-choice small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
}
.awc-frontend .awc-product-checkout { margin-top: 18px; }

.awc-frontend .awc-cta {
    display: inline-block;
    background: #1f2937;
    color: #ffffff !important;
    border: 0;
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.awc-frontend .awc-cta:hover { background: #111827; }
.awc-frontend .awc-cta[disabled] { opacity: 0.5; cursor: not-allowed; }
.awc-frontend .awc-cta.awc-secondary {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937 !important;
}
.awc-frontend .awc-inline-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1f2937;
    margin: 0 0 14px;
    padding: 10px 12px;
}
.awc-frontend .awc-login-required {
    margin: 0 auto;
    max-width: 460px;
}
.awc-frontend .awc-login-required h3 {
    margin-top: 0;
}
.awc-frontend .awc-native-login form,
.awc-frontend .awc-login-form {
    display: grid;
    gap: 12px;
}
.awc-frontend .awc-native-login label,
.awc-frontend .awc-login-form label {
    display: grid;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
}
.awc-frontend .awc-native-login input[type="text"],
.awc-frontend .awc-native-login input[type="password"],
.awc-frontend .awc-login-form input {
    width: 100%;
}
.awc-frontend .awc-native-login .login-remember label {
    align-items: center;
    display: flex;
    font-weight: 400;
}
.awc-frontend .awc-native-login .login-submit {
    margin: 0;
}
.awc-frontend .awc-native-login .button-primary {
    background: #1f2937;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    padding: 10px 18px;
}
.awc-frontend .awc-login-links {
    margin: 12px 0 0;
}

.awc-frontend .awc-checkout-email-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 auto 12px;
    max-width: 280px;
    text-align: left;
}
.awc-frontend .awc-checkout-email-field span {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
}
.awc-frontend .awc-checkout-email-field input {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
}
.awc-frontend .awc-checkout-email-field input:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}

.awc-frontend table.awc-list {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.awc-frontend table.awc-list th,
.awc-frontend table.awc-list td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    text-align: left;
}
.awc-frontend table.awc-list th { background: #f9fafb; font-weight: 600; color: #374151; }
.awc-frontend table.awc-list tr:last-child td { border-bottom: 0; }
.awc-frontend table.awc-list td.num { text-align: right; font-variant-numeric: tabular-nums; }
.awc-frontend .awc-order-detail summary {
    cursor: pointer;
    font-weight: 600;
}
.awc-frontend .awc-order-detail summary:focus-visible {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}
.awc-frontend .awc-order-detail-panel {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    color: #374151;
}
.awc-frontend .awc-order-detail-panel h4 {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
}
.awc-frontend .awc-plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.awc-frontend .awc-plain-list li {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.awc-frontend .awc-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f3f4f6;
    color: #374151;
}
.awc-frontend .awc-pill.paid,
.awc-frontend .awc-pill.active,
.awc-frontend .awc-pill.succeeded { background: #d1fae5; color: #065f46; }
.awc-frontend .awc-pill.pending,
.awc-frontend .awc-pill.processing,
.awc-frontend .awc-pill.trialing { background: #fef3c7; color: #92400e; }
.awc-frontend .awc-pill.failed,
.awc-frontend .awc-pill.cancelled,
.awc-frontend .awc-pill.expired,
.awc-frontend .awc-pill.past_due { background: #fee2e2; color: #991b1b; }
.awc-frontend .awc-pill.paused,
.awc-frontend .awc-pill.partially_refunded { background: #dbeafe; color: #1e3a8a; }

.awc-frontend .awc-empty,
.awc-frontend .awc-error {
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    font-size: 14px;
}
.awc-frontend .awc-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

body.single-awc_product .nv-meta-list,
body.single-awc_product .nv-single-post-meta,
body.single-awc_product .entry-meta {
    display: none;
}

.awc-frontend .awc-form-row { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.awc-frontend .awc-form-row label,
.awc-frontend .awc-form-row span { font-size: 13px; color: #1f2937; font-weight: 500; }
.awc-frontend .awc-form-row input,
.awc-frontend .awc-form-row select { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }
.awc-frontend .awc-form-row input:focus,
.awc-frontend .awc-form-row select:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}

.awc-frontend .awc-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.awc-frontend .awc-checkout.is-empty-cart .awc-checkout-section,
.awc-frontend .awc-checkout.is-empty-cart .awc-actions,
.awc-frontend .awc-checkout.is-empty-cart .awc-discount-code,
.awc-frontend .awc-checkout.is-empty-cart .awc-checkout-total {
    display: none;
}
.awc-frontend .awc-link-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: #1f2937;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}
.awc-frontend .awc-link-button.awc-danger { color: #991b1b; }

.awc-frontend .awc-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
    gap: 24px;
    align-items: start;
}
.awc-frontend .awc-checkout-main h3 { margin-top: 0; }
.awc-frontend .awc-checkout-section {
    border-bottom: 1px solid #f3f4f6;
    margin: 0 0 18px;
    padding: 0 0 10px;
}
.awc-frontend .awc-checkout-section h3 {
    font-size: 16px;
    margin: 0 0 12px;
}
.awc-frontend .awc-checkout-stage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 18px;
}
.awc-frontend .awc-checkout-stage span {
    background: #f3f4f6;
    border-radius: 999px;
    color: #6b7280;
    font-size: 12px;
    padding: 6px 8px;
    text-align: center;
}
.awc-frontend .awc-checkout-stage span.is-active {
    background: #dbeafe;
    color: #1e3a8a;
    font-weight: 700;
}
.awc-frontend .awc-checkout-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.awc-frontend .awc-inline-field {
    display: flex;
    gap: 8px;
}
.awc-frontend .awc-inline-field input { flex: 1 1 auto; }
.awc-frontend .awc-checkout-summary {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #f9fafb;
}
.awc-frontend .awc-checkout-summary h4 { margin: 0 0 12px; }
.awc-frontend .awc-checkout-items {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.awc-frontend .awc-checkout-items li,
.awc-frontend .awc-checkout-totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}
.awc-frontend .awc-checkout-items li {
    align-items: center;
}
.awc-frontend .awc-checkout-items li span {
    flex: 1 1 auto;
    min-width: 0;
}
.awc-frontend .awc-summary-remove {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #991b1b;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    padding: 2px 0;
    text-decoration: underline;
}
.awc-frontend .awc-summary-remove:focus {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}
.awc-frontend .awc-discount-code {
    border-bottom: 1px solid #e5e7eb;
    margin: 0 0 12px;
    padding: 2px 0 12px;
}
.awc-frontend .awc-discount-code-panel {
    margin-top: 10px;
}
.awc-frontend .awc-discount-code-panel[hidden] {
    display: none;
}
.awc-frontend .awc-checkout-totals { margin: 10px 0 0; }
.awc-frontend .awc-checkout-totals dt { color: #6b7280; }
.awc-frontend .awc-checkout-totals dd { margin: 0; font-weight: 600; }
.awc-frontend .awc-checkout-total {
    font-size: 18px;
    font-weight: 700;
    text-align: right;
}
.awc-frontend .awc-payment-panel {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    background: #ffffff;
}
.awc-frontend .awc-payment-panel[hidden],
.awc-frontend .awc-cta[hidden] {
    display: none !important;
}
.awc-frontend .awc-payment-heading {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px;
}
.awc-frontend .awc-stripe-element {
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
}
.awc-frontend .awc-payment-recovery .awc-stripe-element {
    margin: 12px 0;
}
.awc-frontend .awc-stripe-element:focus-within {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}
.awc-frontend .awc-paypal-buttons {
    min-height: 48px;
}
.awc-frontend .awc-payment-help,
.awc-frontend .awc-payment-message {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0 0;
}
.awc-frontend .awc-payment-message {
    min-height: 18px;
}
.awc-frontend .awc-checkout-agreements {
    display: grid;
    gap: 8px;
}
.awc-frontend .awc-agreement {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
}
.awc-frontend .awc-agreement input {
    flex: 0 0 auto;
    margin-top: 3px;
}
.awc-frontend .awc-agreement a {
    color: #1d4ed8;
    text-decoration: underline;
}
.awc-frontend .awc-payment-message.success { color: #065f46; }
.awc-frontend .awc-payment-message.error { color: #991b1b; }
.awc-frontend .awc-account-portal {
    display: grid;
    gap: 18px;
}
.awc-frontend .awc-portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 0;
    background: #ffffff;
}
.awc-frontend .awc-portal-nav button {
    appearance: none;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.2;
    padding: 7px 12px;
    text-decoration: none;
}
.awc-frontend .awc-portal-nav button:hover,
.awc-frontend .awc-portal-nav button:focus,
.awc-frontend .awc-portal-nav button.is-active {
    border-color: #2563eb;
    color: #1d4ed8;
    outline: none;
}
.awc-frontend .awc-portal-nav button.is-active {
    background: #eff6ff;
}
.awc-frontend .awc-portal-section[hidden] {
    display: none;
}
.awc-frontend .awc-portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: start;
}
.awc-frontend .awc-portal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.awc-frontend .awc-portal-summary-card {
    color: inherit;
    margin: 0;
    text-decoration: none;
}
.awc-frontend .awc-portal-summary-card span,
.awc-frontend .awc-portal-summary-card small {
    color: #6b7280;
    display: block;
    font-size: 12px;
}
.awc-frontend .awc-portal-summary-card strong {
    display: block;
    font-size: 22px;
    margin: 4px 0;
}
.awc-frontend .awc-portal-section > h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.awc-frontend .awc-payment-method-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.awc-frontend .awc-payment-method-header,
.awc-frontend .awc-payment-method-card-head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}
.awc-frontend .awc-payment-method-header {
    margin: 0 0 12px;
}
.awc-frontend .awc-payment-method-header h4,
.awc-frontend .awc-payment-method-default h5 {
    margin: 0 0 4px;
}
.awc-frontend .awc-payment-provider-note {
    margin-bottom: 12px;
}
.awc-frontend .awc-payment-method-default {
    margin-top: 16px;
}
.awc-frontend .awc-payment-method-card h4 {
    margin: 0;
    font-size: 15px;
}
.awc-frontend .awc-payment-method-meta {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin: 12px 0;
}
.awc-frontend .awc-payment-method-meta div {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    padding: 8px;
}
.awc-frontend .awc-payment-method-meta dt {
    color: #6b7280;
    font-size: 11px;
    margin: 0 0 3px;
}
.awc-frontend .awc-payment-method-meta dd {
    margin: 0;
    font-size: 13px;
}
.awc-frontend .awc-payment-method-actions {
    flex-wrap: wrap;
}
.awc-frontend .awc-profile-grid,
.awc-frontend .awc-address-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.awc-frontend .awc-address-card p {
    white-space: pre-line;
}
.awc-frontend .awc-address-card-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.awc-frontend .awc-address-card-head h4 {
    margin: 0;
}
.awc-frontend .awc-address-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.awc-frontend .awc-address-actions .awc-cta {
    padding: 8px 12px;
}
.awc-frontend .awc-address-edit {
    border-top: 1px solid #e5e7eb;
    margin-top: 14px;
    padding-top: 12px;
}
.awc-frontend .awc-address-edit summary {
    cursor: pointer;
    font-weight: 600;
}
.awc-frontend .awc-address-form-wrap {
    margin-top: 12px;
}
.awc-frontend .awc-address-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.awc-frontend .awc-address-form label {
    display: grid;
    gap: 5px;
}
.awc-frontend .awc-address-form .awc-checkbox {
    display: block;
}
.awc-frontend .awc-portal-health {
    grid-column: 1 / -1;
    margin-top: 14px;
}
.awc-frontend .awc-portal-health h4 {
    margin: 0 0 8px;
}
.awc-frontend .awc-portal-health ul {
    margin: 0;
    padding-left: 18px;
}

.awc-frontend .awc-status-banner {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 0 16px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 13px;
}
.awc-frontend .awc-status-banner.success { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.awc-frontend .awc-status-banner.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

@media (max-width: 720px) {
    .awc-frontend .awc-checkout-grid,
    .awc-frontend .awc-checkout-two,
    .awc-frontend .awc-checkout-stage,
    .awc-frontend .awc-portal-hero,
    .awc-frontend .awc-portal-summary-grid {
        grid-template-columns: 1fr;
    }
    .awc-frontend .awc-inline-field {
        flex-direction: column;
    }
    .awc-frontend table.awc-list {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
