/* ==========================================================================
   Settings & BulkGenerate - shared form styles
   Settings.js | BulkGenerate.js | shared page layouts
   Review Helper for WooCommerce
   ========================================================================== */

.rhwc-page-shell {
    display: grid;
    gap: 24px;
}

.rhwc-page-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f4f9ff 52%, #eef6ff 100%);
    box-shadow: var(--rhwc-shadow);
}

.rhwc-page-hero__main {
    min-width: 0;
}

.rhwc-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.rhwc-page-hero__title {
    margin: 0 0 10px;
    font-size: 29px;
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: var(--rhwc-text);
}

.rhwc-page-hero__description {
    margin: 0;
    max-width: 700px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--rhwc-text-muted);
}

.rhwc-page-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.rhwc-page-hero__chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: #1e3a8a;
    font-size: 12.5px;
    font-weight: 700;
}

.rhwc-page-hero__stats {
    min-width: 270px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.rhwc-page-stat {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.16);
}

.rhwc-page-stat__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rhwc-text-light);
    margin-bottom: 6px;
}

.rhwc-page-stat__value {
    display: block;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--rhwc-text);
}

.rhwc-page-grid {
    display: grid;
    gap: 20px;
}

.rhwc-page-grid--sidebar {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.95fr);
    align-items: start;
}

.rhwc-settings-stack {
    display: grid;
    gap: 20px;
}

.rhwc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.rhwc-card-header h2 {
    margin-bottom: 0;
}

.rhwc-card-header p {
    margin: 8px 0 0;
    color: var(--rhwc-text-muted);
    font-size: 13.5px;
}

.rhwc-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.rhwc-card-badge--danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.rhwc-form-section {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--rhwc-border);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    margin-bottom: 18px;
}

.rhwc-form-section:last-of-type {
    margin-bottom: 0;
}

.rhwc-form-section__head {
    margin-bottom: 18px;
}

.rhwc-form-section__head h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--rhwc-text);
}

.rhwc-form-section__head p {
    margin: 0;
    font-size: 13px;
    color: var(--rhwc-text-muted);
}

.rhwc-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rhwc-form-grid .rhwc-form-row {
    margin-bottom: 0;
}

.rhwc-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rhwc-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--rhwc-border);
    background: #ffffff;
    cursor: pointer;
    transition: transform var(--rhwc-transition), box-shadow var(--rhwc-transition), border-color var(--rhwc-transition), background var(--rhwc-transition);
}

.rhwc-choice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rhwc-shadow);
    border-color: rgba(96, 165, 250, 0.32);
}

.rhwc-choice-card--active {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.1);
}

.rhwc-choice-card input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--rhwc-primary);
    width: 16px;
    height: 16px;
}

.rhwc-choice-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rhwc-choice-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--rhwc-text);
}

.rhwc-choice-card__desc {
    font-size: 12.8px;
    line-height: 1.55;
    color: var(--rhwc-text-muted);
}

.rhwc-inline-field {
    margin-top: 14px;
}

.rhwc-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    margin-top: 20px;
    border-radius: 20px;
    border: 1px solid var(--rhwc-border);
    background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.rhwc-action-bar__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rhwc-action-bar__content strong {
    color: var(--rhwc-text);
    font-size: 14px;
}

.rhwc-action-bar__content span {
    color: var(--rhwc-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.rhwc-info-list {
    display: grid;
    gap: 12px;
}

.rhwc-info-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid var(--rhwc-border);
    background: #ffffff;
}

.rhwc-info-list__label {
    color: var(--rhwc-text-muted);
    font-size: 13px;
}

.rhwc-info-list__value {
    color: var(--rhwc-text);
    font-size: 13.5px;
    font-weight: 700;
    text-align: right;
}

.rhwc-note-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff, #f8fbff);
    border: 1px solid #bfdbfe;
}

.rhwc-note-card strong {
    display: block;
    margin-bottom: 6px;
    color: #1e3a8a;
    font-size: 13.5px;
}

.rhwc-note-card p {
    margin: 0;
    color: var(--rhwc-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.rhwc-section-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--rhwc-primary);
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rhwc-border);
}

.rhwc-form-row {
    margin-bottom: 20px;
}

.rhwc-form-row label,
.rhwc-form__label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--rhwc-text);
    margin-bottom: 6px;
}

.rhwc-form__sublabel {
    color: var(--rhwc-text-muted);
    font-weight: 400;
    font-size: 12.5px;
}

.rhwc-input,
.rhwc-select,
.rhwc-textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--rhwc-border);
    border-radius: var(--rhwc-radius-sm);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--rhwc-text);
    background: #ffffff;
    transition: border-color var(--rhwc-transition), box-shadow var(--rhwc-transition), background var(--rhwc-transition);
    outline: none;
}

.rhwc-input {
    max-width: 140px;
}

.rhwc-select {
    min-width: 0;
}

.rhwc-textarea {
    max-width: 100%;
    resize: vertical;
}

.rhwc-input--wide,
.rhwc-textarea--wide {
    max-width: none;
}

.rhwc-input:focus,
.rhwc-select:focus,
.rhwc-textarea:focus {
    border-color: var(--rhwc-primary-light);
    box-shadow: 0 0 0 3px var(--rhwc-primary-glow);
    background: #ffffff;
}

.rhwc-form-row .rhwc-desc,
.rhwc-desc {
    display: block;
    font-size: 12.5px;
    color: var(--rhwc-text-muted);
    margin-top: 5px;
}

.rhwc-tip-box {
    background: linear-gradient(135deg, #eff6ff, #f8fbff);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--rhwc-primary-light);
    border-radius: var(--rhwc-radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--rhwc-text-muted);
    margin-top: 10px;
}

.rhwc-tip-box code {
    background: rgba(37, 99, 235, 0.08);
    color: var(--rhwc-primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.rhwc-danger-zone {
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
}

.rhwc-danger-zone__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--rhwc-danger);
    cursor: pointer;
    font-size: 13.5px;
}

.rhwc-danger-zone__label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rhwc-danger);
    cursor: pointer;
}

.rhwc-danger-zone__desc {
    margin-top: 8px;
    font-size: 12.8px;
    color: var(--rhwc-text-muted);
    line-height: 1.6;
}

.rhwc-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--rhwc-text);
    font-size: 13.5px;
}

.rhwc-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rhwc-primary);
    cursor: pointer;
}

.rhwc-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin-top: 18px;
    border-radius: 20px;
    border: 1px solid var(--rhwc-border);
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    cursor: pointer;
}

.rhwc-toggle-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--rhwc-primary);
    cursor: pointer;
}

.rhwc-toggle-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rhwc-toggle-card__title {
    color: var(--rhwc-text);
    font-size: 13.8px;
    font-weight: 700;
}

.rhwc-toggle-card__desc {
    color: var(--rhwc-text-muted);
    font-size: 12.8px;
    line-height: 1.55;
}

.rhwc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhwc-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--rhwc-text);
}

.rhwc-radio-label input[type="radio"] {
    accent-color: var(--rhwc-primary);
    width: 16px;
    height: 16px;
}

.rhwc-bulk-status {
    padding: 14px 18px;
    border-left: 4px solid var(--rhwc-primary);
    background: var(--rhwc-primary-glow);
    border-radius: var(--rhwc-radius-sm);
    font-size: 13.5px;
    color: var(--rhwc-primary-dark);
    margin-top: 18px;
    font-weight: 500;
}

.rhwc-inline-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rhwcSpin 0.7s linear infinite;
}

@media (max-width: 1180px) {
    .rhwc-page-grid--sidebar {
        grid-template-columns: 1fr;
    }

    .rhwc-page-hero {
        flex-direction: column;
    }

    .rhwc-page-hero__stats {
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rhwc-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .rhwc-choice-grid,
    .rhwc-form-grid,
    .rhwc-page-hero__stats {
        grid-template-columns: 1fr;
    }

    .rhwc-card-header,
    .rhwc-action-bar,
    .rhwc-info-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .rhwc-card-badge {
        white-space: normal;
    }

    .rhwc-info-list__value {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .rhwc-page-hero {
        padding: 22px 20px;
        border-radius: 22px;
    }

    .rhwc-page-hero__title {
        font-size: 25px;
    }

    .rhwc-form-section {
        padding: 18px;
    }
}
