/**
 * CMUK Application Form Styles
 * Multi-step vendor application with membership selection
 */

/* ========================================
   Container & Layout
   ======================================== */
   .cmuk-application-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--wp--preset--spacing--medium);
    min-height: 60vh;
}

/* ============================================
   Application Form
   ============================================ */
.cmuk-application-form {
    max-width: 1200px;
    margin: 0 auto;
}

.cmuk-application-card {
    background: var(--cmuk-bg-card, #fff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ========================================
   Messages & Notices
   ======================================== */
.cmuk-application-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--cmuk-bg-secondary, #f8f9fa);
}

.cmuk-application-message .icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cmuk-application-message--warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.cmuk-application-message--warning .icon {
    color: #856404;
}

.cmuk-application-message--info {
    background: #e7f5ff;
    border: 1px solid #74c0fc;
}

.cmuk-application-message--info .icon {
    color: #1971c2;
}

.cmuk-application-message p {
    margin: 0 0 0.5rem;
    color: var(--cmuk-text, #1a1a2e);
}

.cmuk-application-pending {
    font-style: italic;
    opacity: 0.8;
}

/* Resubmit Notice */
.cmuk-application-resubmit-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    border: 1px solid #ffa94d;
    border-radius: 12px;
}

.cmuk-application-resubmit-notice .icon {
    font-size: 28px;
    color: #e67700;
    flex-shrink: 0;
}

.cmuk-application-resubmit-notice strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #e67700;
    font-size: 1.1rem;
}

.cmuk-rejection-reason {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.cmuk-rejection-reason strong {
    color: #1a1a2e;
}

/* ========================================
   Progress Bar
   ======================================== */
.cmuk-application-progress {
    margin-bottom: var(--wp--preset--spacing--medium);
}

.cmuk-progress-bar {
    height: 6px;
    background: var(--cmuk-brand-slate);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.cmuk-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cmuk-brand-teal) 0%, var(--cmuk-brand-teal) 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmuk-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.cmuk-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.cmuk-progress-step.active,
.cmuk-progress-step.completed {
    opacity: 1;
}

.cmuk-step-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cmuk-brand-navy-50);
    color: var(--cmuk-brand-navy);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.cmuk-progress-step.active .cmuk-step-number {
    background: var(--cmuk-brand-teal);
    color: var(--cmuk-white);
    box-shadow: 0 4px 12px rgba(0, 206, 181, 0.3);
}

.cmuk-progress-step.completed .cmuk-step-number {
    background: var(--cmuk-brand-teal);
    color: var(--cmuk-brand-teal-50);
}

.cmuk-step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cmuk-text-muted, #6c757d);
    text-align: center;
}

.cmuk-progress-step.active .cmuk-step-label {
    color: var(--cmuk-brand-teal);
    font-weight: 600;
}

@media (max-width: 480px) {
    .cmuk-step-label {
        display: none;
    }

    .cmuk-step-number {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   Form Steps
   ======================================== */
.cmuk-form-step {
    display: none;
    animation: fadeInStep 0.4s ease;
}

.cmuk-form-step.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cmuk-step-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.cmuk-step-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 0.5rem;
}

.cmuk-step-header p {
    color: var(--cmuk-text-muted, #6c757d);
    margin: 0;
    font-size: 1rem;
}

/* ========================================
   Membership Grid
   ======================================== */
.cmuk-membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .cmuk-membership-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cmuk-membership-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--cmuk-bg-card, #fff);
    border: 2px solid var(--cmuk-border, #e5e7eb);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cmuk-membership-card:hover {
    border-color: var(--cmuk-brand-teal);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.cmuk-membership-card.selected {
    border-color: var(--cmuk-brand-teal);
    background: linear-gradient(135deg, rgba(0, 206, 181, 0.03) 0%, rgba(0, 206, 181, 0.08) 100%);
    box-shadow: 0 8px 32px rgba(0, 206, 181, 0.15);
}

.cmuk-membership-card--primary {
    border-color: var(--cmuk-brand-teal);
    box-shadow: 0 12px 40px rgba(0, 206, 181, 0.18);
    background: linear-gradient(135deg, #ffffff 0%, rgba(0, 206, 181, 0.04) 100%);
}

.cmuk-membership-card--primary .cmuk-membership-header h3 {
    font-size: 1.5rem;
}

.cmuk-membership-card--secondary {
    background: var(--cmuk-bg-secondary, #f8f9fa);
}

.cmuk-membership-card--secondary .cmuk-membership-header h3 {
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-membership-card--luxe {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cmuk-brand-navy) 0%, #0a4a8c 100%);
    box-shadow: 0 12px 40px rgba(5, 56, 107, 0.25);
}

.cmuk-membership-card--luxe .cmuk-membership-header h3,
.cmuk-membership-card--luxe .cmuk-price-amount,
.cmuk-membership-card--luxe .cmuk-membership-features li {
    color: var(--cmuk-brand-cream);
}

.cmuk-membership-card--luxe .cmuk-membership-header h3 {
    font-size: 1.5rem;
}

.cmuk-membership-card--luxe .cmuk-membership-desc,
.cmuk-membership-card--luxe .cmuk-price-period,
.cmuk-membership-card--luxe .cmuk-toggle-text {
    color: var(--cmuk-brand-gold-50);
}

.cmuk-membership-card--luxe .cmuk-billing-period-toggle:not(:checked)~.cmuk-toggle-text .cmuk-toggle-monthly,
.cmuk-membership-card--luxe .cmuk-billing-period-toggle:checked~.cmuk-toggle-text .cmuk-toggle-annual {
    color: #fff;
}

.cmuk-membership-card--luxe .cmuk-membership-features .icon {
    color: var(--cmuk-brand-gold);
}

.cmuk-membership-card--luxe .cmuk-membership-features li {
    border-bottom-color: rgba(247, 170, 41, 0.2);
}

.cmuk-membership-card--luxe .cmuk-membership-pricing {
    border-bottom-color: rgba(247, 170, 41, 0.3);
}

.cmuk-membership-card--luxe:hover {
    border-color: transparent;
    box-shadow: 0 16px 48px rgba(5, 56, 107, 0.35);
}

.cmuk-membership-card--luxe.selected {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cmuk-brand-navy) 0%, #0a4a8c 100%);
    box-shadow: 0 16px 48px rgba(5, 56, 107, 0.4);
}

.cmuk-membership-card--luxe .cmuk-select-membership {
    color: var(--cmuk-brand-gold);
    border-color: var(--cmuk-brand-gold);
}

.cmuk-membership-card--luxe .cmuk-select-membership:hover,
.cmuk-membership-card--luxe.selected .cmuk-select-membership {
    background: var(--cmuk-brand-gold);
    border-color: var(--cmuk-brand-gold);
    color: var(--cmuk-brand-navy);
}

/* ========================================
   Membership Comparison Table
   ======================================== */
.cmuk-comparison-table-wrapper {
    margin: 2.5rem 0 2rem;
    background: var(--cmuk-bg-card, #fff);
    border: 1px solid var(--cmuk-border, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
}

.cmuk-comparison-table-title {
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-bottom: 1px solid var(--cmuk-border, #e5e7eb);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cmuk-text, #1a1a2e);
    text-align: center;
}

.cmuk-comparison-table-scroll {
    overflow-x: auto;
}

.cmuk-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.cmuk-comparison-table th,
.cmuk-comparison-table td {
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--cmuk-border-light, #f1f3f4);
}

.cmuk-comparison-table thead th {
    background: var(--cmuk-bg-secondary, #f8f9fa);
    font-weight: 700;
    color: var(--cmuk-text, #1a1a2e);
    padding: 1rem;
    border-bottom: 2px solid var(--cmuk-border, #e5e7eb);
}

.cmuk-comparison-table thead th:first-child,
.cmuk-comparison-table tbody th {
    text-align: left;
}

.cmuk-comparison-table tbody th {
    font-weight: 500;
    color: var(--cmuk-text, #1a1a2e);
    background: var(--cmuk-bg-secondary, #f8f9fa);
}

.cmuk-comparison-table tbody tr:last-child th,
.cmuk-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.cmuk-comparison-yes {
    color: var(--cmuk-success, #10b981);
    font-size: 22px;
}

.cmuk-comparison-no {
    color: var(--cmuk-gray-300, #d1d5db);
    font-size: 22px;
}

.cmuk-comparison-value {
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
}

.cmuk-comparison-table thead .cmuk-comparison-tier-plus,
.cmuk-comparison-table thead .cmuk-comparison-tier-premium {
    color: var(--cmuk-brand-teal);
}

@media (max-width: 768px) {
    .cmuk-comparison-table {
        min-width: 540px;
    }
    .cmuk-comparison-table th,
    .cmuk-comparison-table td {
        padding: 0.75rem 0.625rem;
    }
}

.cmuk-membership-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cmuk-membership-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 0.5rem;
}

.cmuk-membership-desc {
    font-size: 0.875rem;
    color: var(--cmuk-text-muted, #6c757d);
    margin: 0;
    line-height: 1.5;
}

/* Pricing */
.cmuk-membership-pricing {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--cmuk-border, #e5e7eb);
}

.cmuk-billing-toggle {
    margin-bottom: 1rem;
}

.cmuk-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cmuk-billing-period-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--wp--preset--color--slate, #e9ecef);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cmuk-billing-period-toggle:checked {
    background: var(--wp--preset--color--teal);
}

.cmuk-billing-period-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cmuk-billing-period-toggle:checked::before {
    transform: translateX(22px);
}

.cmuk-toggle-text {
    font-size: 0.8rem;
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-toggle-monthly,
.cmuk-toggle-annual {
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.cmuk-billing-period-toggle:not(:checked)~.cmuk-toggle-text .cmuk-toggle-monthly {
    color: var(--cmuk-text, #1a1a2e);
    font-weight: 600;
}

.cmuk-billing-period-toggle:checked~.cmuk-toggle-text .cmuk-toggle-annual {
    color: var(--cmuk-text, #1a1a2e);
    font-weight: 600;
}

.cmuk-price-display {
    margin: 0.75rem 0;
}

.cmuk-price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cmuk-text, #1a1a2e);
    line-height: 1;
}

.cmuk-price-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-annual-savings {
    display: inline-block;
    background: var(--cmuk-success-light, #d3f9d8);
    color: var(--cmuk-success, #10b981);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Features List */
.cmuk-membership-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex-grow: 1;
}

.cmuk-membership-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--cmuk-text, #1a1a2e);
    border-bottom: 1px solid var(--cmuk-border-light, #f1f3f4);
}

.cmuk-membership-features li:last-child {
    border-bottom: none;
}

.cmuk-membership-features .icon {
    color: var(--cmuk-success, #10b981);
    font-size: 18px;
    flex-shrink: 0;
}

/* Select Button */
.cmuk-select-membership {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    margin-top: auto;
}

.cmuk-membership-card.selected .cmuk-select-membership {
    background: var(--cmuk-brand-teal);
    border-color: var(--cmuk-brand-teal);
    color: #fff;
}

/* ========================================
   Form Elements
   ======================================== */
/* Application form uses standard form classes from cmuk-common.css */
/* Additional application-specific form styles */

/* Validation styles - Only show red border when parent has .cmuk-validated class or element has .error class */
.cmuk-validated .form-group input:invalid,
.cmuk-validated .form-group select:invalid,
.cmuk-validated .form-group textarea:invalid,
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--cmuk-danger, #ef4444);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input[readonly] {
    background: var(--cmuk-bg-tertiary, #f8f9fa);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Required asterisk styling */
.form-label .required {
    color: var(--cmuk-danger, #ef4444);
    margin-left: 0.125rem;
}

/* Password Field */
.cmuk-password-field {
    position: relative;
}

.cmuk-password-field .form-control {
    padding-right: 3rem;
}

.cmuk-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--cmuk-text-muted, #6c757d);
    transition: color 0.2s ease;
}

.cmuk-toggle-password:hover {
    color: var(--cmuk-brand-teal);
}

.cmuk-toggle-password .icon {
    font-size: 20px;
}

/* Checkbox styles now use standard .form-check from cmuk-common.css */

/* Payment Method Cards */
.cmuk-payment-methods {
    margin-top: 2rem;
}

.cmuk-payment-methods h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--cmuk-text, #1a1a2e);
}

.cmuk-payment-method {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--cmuk-border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 1rem;
}

.cmuk-payment-method:hover {
    border-color: var(--cmuk-brand-teal);
    background: #f8fafc;
}

.cmuk-payment-method.selected {
    border-color: var(--cmuk-brand-teal);
    background: #f0fdf4;
    /* Match green theme */
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.cmuk-payment-method input[type="radio"] {
    margin: 0;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--cmuk-brand-teal);
}

.cmuk-payment-method label {
    margin: 0;
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cmuk-payment-icons {
    display: flex;
    gap: 0.5rem;
    opacity: 0.8;
}

.cmuk-payment-icons .icon {
    font-size: 1.75rem;
    color: #64748b;
}

/* GoCardless specific */
.cmuk-payment-method[data-method="gocardless"] .icon {
    color: #242a56;
    /* GoCardless blue */
}

.cmuk-payment-method[data-method="card"] .icon.ph-credit-card {
    color: #635bff;
    /* Stripe blurple ish */
}

.cmuk-checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--cmuk-border, #e5e7eb);
    border-radius: 6px;
    background: var(--cmuk-bg-card, #fff);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmuk-checkbox-label input:checked+.cmuk-checkbox-custom {
    background: var(--cmuk-brand-teal);
    border-color: var(--cmuk-brand-teal);
}

.cmuk-checkbox-label input:checked+.cmuk-checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.cmuk-checkbox-label a {
    color: var(--cmuk-brand-teal);
    text-decoration: none;
}

.cmuk-checkbox-label a:hover {
    text-decoration: underline;
}

/* ========================================
   File Upload
   ======================================== */
.cmuk-file-upload-area {
    border: 2px dashed var(--cmuk-border, #d1d5db);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--cmuk-bg-secondary, #f8f9fa);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cmuk-file-upload-area:hover,
.cmuk-file-upload-area.dragover {
    border-color: var(--cmuk-brand-teal);
    background: rgba(99, 102, 241, 0.05);
}

.cmuk-file-upload-area .icon {
    font-size: 48px;
    color: var(--cmuk-brand-teal);
    margin-bottom: 1rem;
    display: block;
}

.cmuk-file-upload-area p {
    margin: 0 0 0.5rem;
    color: var(--cmuk-text, #1a1a2e);
    font-weight: 500;
}

.cmuk-file-hint {
    font-size: 0.8125rem;
    color: var(--cmuk-text-muted, #6c757d);
    font-weight: 400;
}

.cmuk-file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cmuk-file-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cmuk-bg-tertiary, #e9ecef);
}

.cmuk-file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cmuk-file-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cmuk-file-remove:hover {
    background: var(--cmuk-danger, #ef4444);
}

.cmuk-file-remove .icon {
    font-size: 14px;
}

/* ========================================
   Navigation & Buttons
   ======================================== */
.cmuk-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cmuk-border, #e5e7eb);
}

.cmuk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.cmuk-btn .icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.cmuk-btn--primary {
    background: var(--cmuk-brand-teal);
    color: var(--cmuk-white, #fff);
    border-color: var(--cmuk-brand-teal);
}

.cmuk-btn--primary:hover {
    background: var(--cmuk-brand-navy);
    border-color: var(--cmuk-brand-navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 206, 181, 0.3);
}

.cmuk-btn--primary:hover .icon {
    transform: translateX(2px);
}

.cmuk-btn--secondary {
    background: transparent;
    color: var(--cmuk-text, #1a1a2e);
    border-color: var(--cmuk-border, #e5e7eb);
}

.cmuk-btn--secondary:hover {
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-btn--outline {
    background: transparent;
    color: var(--wp--preset--color--teal);
    border-color: var(--wp--preset--color--teal);
}

.cmuk-btn--outline:hover {
    background: var(--wp--preset--color--teal);
    color: #fff;
}

.cmuk-btn--submit {
    min-width: 200px;
}

.cmuk-btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cmuk-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Validation Messages
   ======================================== */
.cmuk-form-validation-message {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9375rem;
}

/* ========================================
   Success State
   ======================================== */
.cmuk-application-success {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border: 1px solid var(--cmuk-brand-slate-50);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.cmuk-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--cmuk-brand-teal) 0%, #00a08c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cmuk-success-icon .icon {
    font-size: 40px;
    color: #fff;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cmuk-application-success h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 1rem;
}

.cmuk-application-success p {
    color: var(--cmuk-text-muted, #6c757d);
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.cmuk-application-success .cmuk-btn {
    margin-top: 1.5rem;
}

/* ========================================
   Payment Step
   ======================================== */
.cmuk-payment-summary {
    margin-bottom: 2rem;
}

.cmuk-summary-card {
    background: linear-gradient(135deg, var(--cmuk-bg-secondary, #f8f9fa) 0%, var(--cmuk-bg-tertiary, #e9ecef) 100%);
    border-radius: 12px;
    padding: 1.5rem;
}

.cmuk-summary-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cmuk-border, #e5e7eb);
}

.cmuk-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.cmuk-summary-label {
    color: var(--cmuk-text-muted, #6c757d);
    font-size: 0.9375rem;
}

.cmuk-summary-value {
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    font-size: 0.9375rem;
}

.cmuk-summary-row--total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cmuk-border, #e5e7eb);
}

.cmuk-summary-row--total .cmuk-summary-label {
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
}

.cmuk-summary-price {
    font-size: 1.25rem;
    color: var(--cmuk-brand-teal);
}

.cmuk-payment-methods {
    margin-bottom: 2rem;
}

.cmuk-payment-methods h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 1rem;
}

.cmuk-payment-method {
    background: var(--cmuk-bg-card, #fff);
    border: 2px solid var(--cmuk-border, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cmuk-payment-method:hover {
    border-color: var(--cmuk-brand-teal);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.cmuk-payment-method-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cmuk-payment-method-icon {
    font-size: 2rem;
    line-height: 1;
}

.cmuk-payment-method-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 0.25rem;
}

.cmuk-payment-method-info p {
    font-size: 0.875rem;
    color: var(--cmuk-text-muted, #6c757d);
    margin: 0;
}

.cmuk-payment-btn {
    width: 100%;
}

.cmuk-payment-unavailable {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 12px;
}

.cmuk-payment-unavailable .icon {
    font-size: 24px;
    color: #c53030;
    flex-shrink: 0;
}

.cmuk-payment-unavailable p {
    margin: 0;
    color: #c53030;
}

.cmuk-payment-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.cmuk-payment-notice .icon {
    font-size: 24px;
    color: var(--cmuk-success, #10b981);
    flex-shrink: 0;
}

.cmuk-payment-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--cmuk-text-muted, #6c757d);
}

/* ========================================
   Shop Name & Email Availability Feedback
   ======================================== */
.cmuk-shop-name-feedback,
#contact_email_feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Ensure feedback appears within form-control-wrap */
.form-control-wrap .cmuk-shop-name-feedback,
.form-control-wrap #contact_email_feedback {
    margin-top: 0.5rem;
}

.cmuk-shop-name-feedback.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.cmuk-shop-name-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.cmuk-shop-name-feedback::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-size: contain;
}

.cmuk-shop-name-feedback.success::before {
    content: '✓';
    color: #22c55e;
    font-weight: bold;
}

.cmuk-shop-name-feedback.error::before {
    content: '✕';
    color: #ef4444;
    font-weight: bold;
}

#shop_name.checking,
#contact_email.checking {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { background-position: right 12px center; }
    to { background-position: right 12px center; }
}

/* ========================================
   Step Icons
   ======================================== */
.cmuk-step-icon {
    display: block;
    font-size: 2.5rem;
    color: var(--cmuk-brand-teal);
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

/* ========================================
   Mobile Progress Label
   ======================================== */
.cmuk-progress-current-label {
    display: none;
}

/* ========================================
   Step 1 Welcome / Value Proposition
   ======================================== */
.cmuk-step-welcome {
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.cmuk-step-welcome__intro {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--cmuk-text, #1a1a2e);
    font-weight: 500;
    line-height: 1.5;
}

.cmuk-step-welcome__features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cmuk-step-welcome__feature {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--cmuk-text-muted, #6c757d);
    font-weight: 500;
}

.cmuk-step-welcome__feature .icon {
    font-size: 1.125rem;
    color: var(--cmuk-brand-teal);
}

/* ========================================
   Photo Tips
   ======================================== */
.cmuk-photo-tips {
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.cmuk-photo-tips__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cmuk-text, #1a1a2e);
    margin: 0 0 0.5rem;
}

.cmuk-photo-tips__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.cmuk-photo-tips__list li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-photo-tips__list .icon {
    font-size: 1rem;
    color: var(--cmuk-brand-teal);
}

/* ========================================
   Trust Strip
   ======================================== */
.cmuk-trust-strip {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    background: var(--cmuk-bg-secondary, #f8f9fa);
    border-radius: 10px;
}

.cmuk-trust-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--cmuk-text-muted, #6c757d);
    font-weight: 500;
}

.cmuk-trust-strip__item .icon {
    font-size: 1.125rem;
    color: var(--cmuk-success, #10b981);
}

/* ========================================
   Guided Prompts & Character Count
   ======================================== */
.cmuk-guided-prompts .form-group {
    margin-bottom: 1.25rem;
}

.cmuk-char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--cmuk-text-muted, #6c757d);
    margin-top: 0.375rem;
    transition: color 0.2s ease;
}

.cmuk-char-count.met {
    color: var(--cmuk-success, #10b981);
}

.cmuk-char-count.met .cmuk-char-current::after {
    content: ' \2713';
}

/* ========================================
   Inline Field Errors
   ======================================== */
.cmuk-field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--cmuk-danger, #ef4444);
    animation: fadeInStep 0.2s ease;
}

.cmuk-field-error .icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* ========================================
   Restore Banner
   ======================================== */
.cmuk-restore-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
    border: 1px solid #74c0fc;
    border-radius: 12px;
}

.cmuk-restore-banner > .icon {
    font-size: 1.5rem;
    color: #1971c2;
    flex-shrink: 0;
}

.cmuk-restore-banner__content {
    flex: 1;
    font-size: 0.9375rem;
    color: #1a1a2e;
}

.cmuk-restore-banner__content strong {
    display: block;
    margin-bottom: 0.125rem;
    color: #1971c2;
}

.cmuk-restore-banner__content span {
    font-size: 0.875rem;
    color: #495057;
}

.cmuk-restore-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cmuk-restore-dismiss {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

.cmuk-restore-dismiss:hover {
    opacity: 1;
}

.cmuk-restore-clear {
    background: none;
    border: none;
    font-size: 0.8125rem;
    cursor: pointer;
    color: #1971c2;
    padding: 0;
    text-decoration: underline;
    font-weight: 500;
}

.cmuk-restore-clear:hover {
    color: #1864ab;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .cmuk-application-container {
        padding: 1.25rem 1rem;
    }

    .cmuk-membership-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cmuk-step-header h2 {
        font-size: 1.5rem;
    }

    .cmuk-step-header p {
        font-size: 0.9375rem;
    }

    .cmuk-form-navigation {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .cmuk-btn {
        width: 100%;
        justify-content: center;
    }

    .cmuk-payment-method-header {
        flex-direction: column;
        text-align: center;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .cmuk-application-container {
        padding: 1rem 0.75rem;
    }

    .cmuk-membership-card {
        padding: 1.25rem;
    }

    .cmuk-price-amount {
        font-size: 2rem;
    }

    .cmuk-progress-current-label {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--cmuk-brand-teal);
    }

    .cmuk-step-welcome__features {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .cmuk-photo-tips__list {
        flex-direction: column;
        gap: 0.375rem;
    }

    .cmuk-trust-strip {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .cmuk-restore-banner {
        flex-wrap: wrap;
    }

    .cmuk-restore-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}
/* ========================================
   Structured business step (2026-09-21)
   ======================================== */
.cmuk-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.cmuk-choice-group--stack {
    flex-direction: column;
    gap: 0.375rem;
}

.cmuk-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--cmuk-border, #dee2e6);
    border-radius: 10px;
    background: #fff;
    font-size: 0.9375rem;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 44px;
}

.cmuk-choice:hover { border-color: var(--cmuk-brand-teal, #00ceb5); }

.cmuk-choice input {
    margin: 0;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--cmuk-brand-teal, #00ceb5);
}

.cmuk-choice:has(input:checked) {
    border-color: var(--cmuk-brand-teal, #00ceb5);
    background: rgba(0, 206, 181, 0.08);
}

.cmuk-choice:has(input:focus-visible) {
    outline: 2px solid var(--cmuk-brand-teal, #00ceb5);
    outline-offset: 2px;
}

.cmuk-choice.is-disabled { opacity: 0.5; cursor: not-allowed; }

.cmuk-choice--pill { border-radius: 999px; padding: 0.5rem 0.875rem; min-height: 40px; }

.cmuk-choice-group.error,
.cmuk-choice-group.error .cmuk-choice { border-color: var(--cmuk-danger, #dc3545); }

.cmuk-link-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.375rem;
}

.cmuk-link-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cmuk-text-muted, #6c757d);
    margin-bottom: 0.25rem;
}

.cmuk-link-label .icon { font-size: 1rem; color: var(--cmuk-brand-teal, #00ceb5); }

.cmuk-platform-other { margin-top: 0.5rem; }

@media (max-width: 640px) {
    .cmuk-link-fields { grid-template-columns: 1fr; }
    .cmuk-choice-group--stack .cmuk-choice { width: 100%; }
}

/* ========================================
   Form sections: page > section > field (2026-09-21)
   ======================================== */
.cmuk-form-section {
    background: #f4f7fb;
    border: 1px solid rgba(5, 56, 107, 0.08);
    border-radius: 14px;
    padding: 1.5rem 1.5rem 1.25rem;
    margin: 0 0 1.5rem;
}

.cmuk-form-section__head {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(5, 56, 107, 0.1);
}

.cmuk-form-section__num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cmuk-brand-teal, #00ceb5);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cmuk-form-section__head h3 {
    margin: 0.2rem 0 0.15rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--cmuk-brand-navy, #05386b);
    line-height: 1.3;
}

.cmuk-form-section__head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-form-section > .form-group:last-child,
.cmuk-form-section > .row:last-child,
.cmuk-form-section > .cmuk-guided-prompts:last-child,
.cmuk-form-section > .cmuk-guided-prompts .form-group:last-child {
    margin-bottom: 0;
}

.cmuk-form-section .form-label {
    color: var(--cmuk-brand-navy, #05386b);
}

.cmuk-form-section .cmuk-photo-tips,
.cmuk-form-section .cmuk-choice {
    background: #fff;
}

.cmuk-form-section .cmuk-photo-tips {
    border: 1px solid rgba(5, 56, 107, 0.1);
}

.cmuk-form-section .cmuk-file-upload-area {
    background: #fff;
}

.cmuk-step-header {
    margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
    .cmuk-form-section {
        padding: 1.125rem 1rem 1rem;
        border-radius: 12px;
    }
    .cmuk-form-section__head {
        gap: 0.625rem;
        margin-bottom: 1rem;
    }
}

/* ========================================
   Standalone /apply/ page (2026-09-21)
   ======================================== */
body.cmuk-apply-page {
    background: #f4f6f9;
    min-height: 100vh;
}

.cmuk-apply-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.cmuk-apply-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid rgba(5, 56, 107, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.cmuk-apply-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.cmuk-apply-logo__img {
    height: 36px;
    width: auto;
    display: block;
}

.cmuk-apply-logo__text {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--cmuk-brand-navy, #05386b);
}

.cmuk-apply-topbar__title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cmuk-text-muted, #6c757d);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cmuk-apply-topbar__exit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cmuk-brand-navy, #05386b);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.cmuk-apply-topbar__exit:hover {
    background: #f4f6f9;
}

.cmuk-apply-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    box-sizing: border-box;
}

.cmuk-apply-page .cmuk-application-form {
    max-width: none;
}

.cmuk-apply-page .cmuk-application-card {
    box-shadow: 0 2px 16px rgba(5, 56, 107, 0.06);
}

.cmuk-apply-footer {
    padding: 1.25rem 1rem 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--cmuk-text-muted, #6c757d);
}

.cmuk-apply-footer__save {
    margin: 0 0 0.5rem;
}

.cmuk-apply-footer__links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.cmuk-apply-footer__links a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .cmuk-apply-topbar {
        padding: 0.625rem 0.875rem;
    }
    .cmuk-apply-topbar__title {
        display: none;
    }
    .cmuk-apply-topbar__exit span {
        display: none;
    }
    .cmuk-apply-topbar__exit .icon {
        font-size: 1.25rem;
    }
    .cmuk-apply-main {
        padding: 1rem 0.75rem 2rem;
    }
}
