/**
 * Shared styles for /help (inc_help) and /re reorder flows (inc_re_*).
 * All interactive layout rules are scoped under .wn-help-re-shell so this
 * sheet can load globally without affecting other pages.
 */

.wn-help-re-shell {
    --wn-re-transition-speed: 0.2s;
    --wn-re-transition-easing: ease-out;
    --wn-re-primary: #2a9ed6;
    --wn-re-primary-hover: #237afc;
    --wn-re-secondary: #2196f3;
    --wn-re-light-bg: #f9f9f9;
    --wn-re-radius-field: 8px;
    --wn-re-radius-panel: 12px;
    --wn-re-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --wn-re-reduced-motion-speed: 0.01s;
}

@media (prefers-reduced-motion: reduce) {
    .wn-help-re-shell {
        --wn-re-transition-speed: var(--wn-re-reduced-motion-speed);
    }

    .wn-help-re-shell *,
    .wn-help-re-shell *::before,
    .wn-help-re-shell *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Express (/help): single-step indicator (same bar weight as /re) --- */
.wn-express-flow-indicator {
    margin: 0 auto 1.25rem;
    max-width: 560px;
}

.wn-express-flow-indicator .progress-bar {
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.wn-express-flow-indicator .progress-fill {
    height: 100%;
    width: 100%;
    background-color: var(--wn-re-primary);
    transition: width 0.5s var(--wn-re-transition-easing);
}

.wn-express-flow-indicator .progress-fill::after {
    display: none;
}

.wn-express-flow-indicator__label {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

/* --- Reorder: fixed progress --- */
.wn-help-re-shell .form-progress {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    max-width: calc(100% - 24px);
    padding: 15px;
    z-index: 1000;
    box-sizing: border-box;
}

.wn-help-re-shell form.wnrform {
    margin-top: 100px;
}

/* Card panels: match express + wndesk conv softness */
.wn-help-re-shell .conv,
.wn-help-re-shell fieldset.conv:not(.voicemail-container),
.wn-help-re-shell .wnbg_main {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: var(--wn-re-radius-panel);
    background-color: var(--wn-re-light-bg);
    box-shadow: var(--wn-re-shadow);
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
}

.wn-help-re-shell .conv,
.wn-help-re-shell fieldset,
.wn-help-re-shell .title,
.wn-help-re-shell .showHideDivs,
.wn-help-re-shell .wnbg_main {
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
}

.wn-help-re-shell .announced {
    display: block !important;
    transform: translateY(10px);
}

.wn-help-re-shell .visible {
    transform: translateY(0);
}

.wn-help-re-shell form input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.wn-help-re-shell form select,
.wn-help-re-shell form textarea {
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
    border: 1px solid #ddd;
    border-radius: var(--wn-re-radius-field);
    padding: 8px;
}

.wn-help-re-shell form input[type="file"] {
    border: 1px solid #ddd;
    border-radius: var(--wn-re-radius-field);
    padding: 8px;
}

.wn-help-re-shell form input:not([type="submit"]):not([type="button"]):focus,
.wn-help-re-shell form select:focus,
.wn-help-re-shell form textarea:focus {
    border-color: var(--wn-re-primary);
    box-shadow: 0 0 0 2px rgba(42, 158, 214, 0.2);
    outline: none;
}

.wn-help-re-shell textarea.expanded {
    transform: scale(1.02);
    box-shadow: var(--wn-re-shadow);
}

.wn-help-re-shell .btn {
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
    position: relative;
    overflow: hidden;
}

.wn-help-re-shell .btn-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wn-help-re-shell .btn:active {
    transform: translateY(1px);
}

/* Progress bar & steps (reorder + shared tokens for express strip) */
.wn-help-re-shell .progress-bar {
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.wn-help-re-shell .progress-fill {
    height: 100%;
    background-color: var(--wn-re-primary);
    width: 33.33%;
    transition: width 0.5s var(--wn-re-transition-easing);
    position: relative;
    overflow: hidden;
}

.wn-help-re-shell .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: wn-re-progress-shimmer 2s infinite;
}

@keyframes wn-re-progress-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .wn-help-re-shell .progress-fill::after {
        animation: none;
    }
}

.wn-help-re-shell .progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wn-help-re-shell .step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    transition: all 0.3s ease;
}

.wn-help-re-shell .step.active {
    background-color: var(--wn-re-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(42, 158, 214, 0.3);
}

.wn-help-re-shell .wnu,
.wn-help-re-shell .wnp {
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

.wn-help-re-shell .wnu {
    min-width: 0 !important;
}

.wn-help-re-shell .showHideDivs {
    padding: 10px;
    border-radius: var(--wn-re-radius-field);
    background-color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.wn-help-re-shell .showHideDivs:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.wn-help-re-shell .title {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: var(--wn-re-radius-field);
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.wn-help-re-shell .title:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Voicemail */
.wn-help-re-shell .voicemail-container {
    padding: 12px 15px;
    border-radius: var(--wn-re-radius-field);
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid #ddd;
    box-shadow: var(--wn-re-shadow);
}

.wn-help-re-shell .voicemail-container .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: var(--wn-re-radius-field);
    border: 1px solid transparent;
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
}

.wn-help-re-shell .btn-voicemail-record {
    background: #2a9ed6 none;
    background-image: none !important;
    color: #fff !important;
    border-color: #1f7fb0;
    text-shadow: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wn-help-re-shell .btn-voicemail-record:hover {
    background: #2379b8 none !important;
    background-image: none !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: 0 2px 6px rgba(42, 158, 214, 0.35);
}

.wn-help-re-shell .btn-voicemail-record:active,
.wn-help-re-shell .btn-voicemail-record.active {
    background: #1d6a9e none !important;
    background-image: none !important;
    color: #fff !important;
    text-shadow: none !important;
}

.wn-help-re-shell .btn-voicemail-stop {
    background: #c53030 none;
    background-image: none !important;
    color: #fff !important;
    border: 1px solid #9b2c2c;
    font-weight: 600;
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wn-help-re-shell .btn-voicemail-stop:hover {
    background: #9b2c2c none !important;
    background-image: none !important;
    border-color: #822727;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(155, 44, 44, 0.45);
}

.wn-help-re-shell .btn-voicemail-stop:active,
.wn-help-re-shell .btn-voicemail-stop.active {
    background: #822727 none !important;
    background-image: none !important;
    color: #fff !important;
    text-shadow: none !important;
}

.wn-help-re-shell .btn-voicemail-play {
    background: #2a9ed6 none;
    background-image: none !important;
    color: #fff !important;
    border-color: #1f7fb0;
    text-shadow: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wn-help-re-shell .btn-voicemail-play:hover {
    background: #2379b8 none !important;
    background-image: none !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: 0 2px 6px rgba(42, 158, 214, 0.35);
}

.wn-help-re-shell .btn-voicemail-play:active,
.wn-help-re-shell .btn-voicemail-play.active {
    background: #1d6a9e none !important;
    background-image: none !important;
    color: #fff !important;
    text-shadow: none !important;
}

.wn-help-re-shell .btn-voicemail-clear {
    background-color: #fff;
    color: #2d3748;
    border: 2px solid #94a3b8;
    font-weight: 600;
}

.wn-help-re-shell .btn-voicemail-clear:hover {
    background-color: #f1f5f9;
    border-color: #64748b;
    color: #1e293b;
}

.wn-help-re-shell .voicemail-status {
    color: #2a9ed6;
    font-size: 0.9rem;
    font-weight: 500;
}

.wn-help-re-shell .voicemail-container #voicemailPlayback {
    border-radius: var(--wn-re-radius-field);
    border: 1px solid #ddd;
}

.wn-help-re-shell .voicemail-fallback {
    color: #1f7fb0;
    background: rgba(42, 158, 214, 0.08);
    border: 1px solid rgba(42, 158, 214, 0.25);
    padding: 10px 12px;
    border-radius: var(--wn-re-radius-field);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.wn-help-re-shell .re-credit-estimate {
    margin: 1.75rem 0 1.25rem;
    padding: 12px 14px;
    border-radius: var(--wn-re-radius-field);
    border-left: 4px solid #2a9ed6;
    background: rgba(42, 158, 214, 0.08);
    box-shadow: var(--wn-re-shadow);
}

.wn-help-re-shell .re-credit-estimate__inner {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a3a4a;
}

.wn-help-re-shell .re-credit-estimate__note {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #555;
}

/* Cross-links (help ↔ re) */
.wn-help-re-shell .form-cross-link a {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: underline;
}

.wn-help-re-shell .form-cross-link a:hover {
    color: var(--wn-re-primary);
}

.wn-help-re-shell .form-cross-link.conv {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #555;
}

/* Brand CTA: replace green PNG slider tiles with solid accent */
.wn-help-re-shell form #slider-right.slider-right-green,
.wn-help-re-shell form button#slider-right.slider-right-green {
    background-image: none !important;
    background-color: var(--wn-re-primary) !important;
    color: #ffffff !important;
}

.wn-help-re-shell form #slider-right.slider-right-green:hover,
.wn-help-re-shell form #slider-right.slider-right-green:focus-visible,
.wn-help-re-shell form button#slider-right.slider-right-green:hover,
.wn-help-re-shell form button#slider-right.slider-right-green:focus-visible {
    background-color: var(--wn-re-primary-hover) !important;
    color: #ffffff !important;
}

/* inc_re_es uses .btn-success for inline submit (not side rail) */
.wn-help-re-shell form input[type="submit"].btn-success,
.wn-help-re-shell .btn.btn-success {
    background-color: var(--wn-re-primary) !important;
    background-image: none !important;
    color: #fff !important;
    border: none;
    border-radius: var(--wn-re-radius-field);
    transition: all var(--wn-re-transition-speed) var(--wn-re-transition-easing);
}

.wn-help-re-shell form input[type="submit"].btn-success:hover,
.wn-help-re-shell .btn.btn-success:hover {
    background-color: var(--wn-re-primary-hover) !important;
    color: #fff !important;
}

/* --- Express form (/help) --- */
.re-form-wrap,
.help-form-wrap {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.wn-help-re-shell .wnp {
    margin-left: auto;
    width: fit-content;
    font-size: 0.95rem;
}

.wn-help-re-shell .wnp .subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
}

.wn-help-re-shell .wnp .form-cross-link {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: #555;
}

.help-form-wrap .wnu.express-form-wrapper {
    max-width: 560px !important;
}

.wn-help-re-shell .express-form-wrapper {
    max-width: 560px;
    margin: 0 auto 300px;
}

.wn-help-re-shell .business-type-selector {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.wn-help-re-shell .business-type-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--wn-re-primary);
    background: transparent;
    color: var(--wn-re-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.wn-help-re-shell .business-type-btn.active,
.wn-help-re-shell .business-type-btn:hover {
    background: var(--wn-re-primary);
    color: white;
}

.wn-help-re-shell .express-form {
    display: grid;
    gap: 1.5rem;
}

.wn-help-re-shell .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.wn-help-re-shell .form-group {
    display: flex;
    flex-direction: column;
}

.wn-help-re-shell .form-group.full-width {
    grid-column: 1 / -1;
}

.wn-help-re-shell .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.wn-help-re-shell .form-input,
.wn-help-re-shell .form-select,
.wn-help-re-shell .form-textarea {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: var(--wn-re-radius-field);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #fbfbfb;
    font-family: 'Open Sans', sans-serif;
}

.wn-help-re-shell .form-input:focus,
.wn-help-re-shell .form-select:focus,
.wn-help-re-shell .form-textarea:focus {
    outline: none;
    border-color: var(--wn-re-primary);
    box-shadow: 0 0 0 0.2rem rgba(42, 158, 214, 0.1);
}

.wn-help-re-shell .form-textarea {
    min-height: 120px;
    resize: vertical;
}

.wn-help-re-shell .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.wn-help-re-shell .service-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e1e5e9;
    border-radius: var(--wn-re-radius-field);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fafbfc;
}

.wn-help-re-shell .service-checkbox:hover {
    border-color: var(--wn-re-primary);
    background: #f0f2f5;
}

.wn-help-re-shell .service-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--wn-re-primary);
    cursor: pointer;
    position: relative;
    z-index: 10;
    margin: 0;
    opacity: 1;
    pointer-events: auto;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
}

.wn-help-re-shell .service-checkbox .service-checkbox-icon {
    font-size: 1.15rem;
    color: var(--wn-re-primary);
    flex-shrink: 0;
    width: 1.25em;
    text-align: center;
}

.wn-help-re-shell .service-checkbox span {
    cursor: pointer;
    user-select: none;
    pointer-events: none;
}

.wn-help-re-shell .submit-btn {
    background: var(--wn-re-primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--wn-re-radius-field);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.wn-help-re-shell .submit-btn:hover {
    background: var(--wn-re-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 158, 214, 0.3);
}

.wn-help-re-shell .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.help-form-wrap .submit-btn.btn.btn-large.slider-right-green {
    background-color: var(--wn-re-primary) !important;
    color: #ffffff !important;
}

.help-form-wrap .submit-btn.btn.btn-large.slider-right-green:hover,
.help-form-wrap .submit-btn.btn.btn-large.slider-right-green:focus-visible {
    background-color: var(--wn-re-primary-hover) !important;
    color: #ffffff !important;
}

.wn-help-re-shell .error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.wn-help-re-shell .form-input.error,
.wn-help-re-shell .form-select.error,
.wn-help-re-shell .form-textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.wn-help-re-shell .form-errors {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--wn-re-radius-field);
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.wn-help-re-shell .success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: var(--wn-re-radius-field);
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.wn-help-re-shell .required-indicator {
    color: #dc3545;
    margin-left: 0.25rem;
}

.wn-help-re-shell .optional-indicator {
    color: #777;
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .wn-help-re-shell .form-progress {
        top: calc(58px + env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 8px 12px 10px;
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 950;
    }

    .wn-help-re-shell form.wnrform {
        margin-top: 150px;
    }

    .wn-help-re-shell .conv,
    .wn-help-re-shell .wnbg_main {
        padding: 10px;
    }

    .wn-help-re-shell .wnbg_main {
        margin-left: 5% !important;
        padding-right: 5% !important;
    }

    .wn-help-re-shell .progress-steps {
        margin-top: 8px;
    }

    .wn-help-re-shell .step {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .wn-help-re-shell .re-credit-estimate {
        margin-top: 2.25rem;
    }

    .wn-help-re-shell .express-form-wrapper {
        padding: 1rem;
    }

    .wn-help-re-shell .form-row {
        grid-template-columns: 1fr;
    }

    .wn-help-re-shell .business-type-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .wn-help-re-shell .business-type-btn {
        width: 100%;
    }

    .wn-help-re-shell .services-grid {
        grid-template-columns: 1fr;
    }
}
