/**
 * BALLOT WIZARD CSS
 * 50/50 Split Layout with Progress Bar Navigation
 * Target: Elderly users (60-80+) who struggle with technology
 * 
 * DESIGN PRINCIPLES:
 * - EXTREMELY SIMPLE - No confusion
 * - HEAVILY GUIDED - Clear instructions at each step
 * - FORGIVING - Easy to go back
 * - VISUALLY CLEAR - Large text, high contrast
 */

/* ============================================================
   CSS VARIABLES - Brand Colors
   ============================================================ */
:root {
    --wizard-primary-dark: #09203b;
    --wizard-primary-accent: #1e90ff;
    --wizard-primary-light: #e8f4fc;
    --wizard-input-bg: #f0f7ff;
    --wizard-input-border: #cce0f5;
    --wizard-success: #10b981;
    --wizard-success-light: #d1fae5;
    --wizard-warning: #f59e0b;
    --wizard-warning-light: #fef3c7;
    --wizard-error: #ef4444;
    --wizard-error-light: #fee2e2;
    --wizard-bg-light: #f8fafc;
    --wizard-bg-card: #ffffff;
    --wizard-text-primary: #1f2937;
    --wizard-text-secondary: #6b7280;
    --wizard-text-muted: #9ca3af;
    --wizard-border: #e5e7eb;
    --wizard-border-focus: #1e90ff;
    --wizard-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --wizard-shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --wizard-shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --wizard-shadow-float: 0 8px 30px rgba(0,0,0,0.12);
    --wizard-shadow-glow: 0 0 20px rgba(30,144,255,0.3);
    --wizard-radius-sm: 6px;
    --wizard-radius-md: 10px;
    --wizard-radius-lg: 16px;
    --wizard-transition: 0.3s ease;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
.ballot-wizard-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--wizard-text-primary);
    background: var(--wizard-bg-light);
    min-height: 100vh;
    box-sizing: border-box;
}

.ballot-wizard-wrapper *,
.ballot-wizard-wrapper *::before,
.ballot-wizard-wrapper *::after {
    box-sizing: inherit;
}

/* WordPress Button Reset - Override ALL WordPress button styles */
.ballot-wizard-wrapper button,
.ballot-wizard-wrapper button.button,
.ballot-wizard-wrapper input[type="button"],
.ballot-wizard-wrapper input[type="submit"],
.ballot-wizard-wrapper .wp-block-button__link,
.ballot-wizard-wrapper .button,
.ballot-wizard-wrapper .btn {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* WordPress Input Reset */
.ballot-wizard-wrapper input,
.ballot-wizard-wrapper textarea,
.ballot-wizard-wrapper select {
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* ============================================================
   HEADER - Logo + Progress + Actions (FIXED HEIGHT)
   ============================================================ */
.wizard-header {
    background: var(--wizard-primary-dark) !important;
    background-color: #09203b !important;
    padding: 0 24px !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.wizard-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-shrink: 0 !important;
    height: 64px !important;
    max-height: 64px !important;
    overflow: hidden !important;
}

.wizard-header-left a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    text-decoration: none !important;
}

.wizard-logo {
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Override any WordPress image styles */
.wizard-header-left img,
.wizard-header-left img.wizard-logo,
.ballot-wizard-wrapper .wizard-logo {
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wizard-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 300px;
}

.wizard-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Utility Buttons */
.wizard-utility-btn {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: var(--wizard-radius-sm) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all var(--wizard-transition) !important;
    text-decoration: none !important;
}

.wizard-utility-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #fff !important;
}

.wizard-utility-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.wizard-utility-btn svg {
    width: 16px;
    height: 16px;
}

.wizard-utility-btn.primary {
    background: var(--wizard-primary-accent) !important;
    border-color: var(--wizard-primary-accent) !important;
}

.wizard-utility-btn.primary:hover {
    background: #1a7fd4 !important;
    border-color: #1a7fd4 !important;
}

/* ============================================================
   PROGRESS BAR - 5 Steps
   ============================================================ */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 0;
    padding-bottom: 20px; /* Space for labels below */
}

.wizard-step {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

/* The connector line AFTER the step */
.wizard-step:not(:last-child)::after {
    content: '';
    width: 50px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    margin: 0 6px;
    flex-shrink: 0;
}

.wizard-step.completed:not(:last-child)::after {
    background: var(--wizard-success);
}

/* The dot - contains number and label */
.wizard-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--wizard-transition);
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.5);
    position: relative;
    flex-shrink: 0;
}

.wizard-step-number {
    display: block;
}

.wizard-step.active .wizard-step-dot {
    background: var(--wizard-primary-accent);
    border-color: var(--wizard-primary-accent);
    color: #fff;
    animation: stepPulse 2s infinite;
}

.wizard-step.completed .wizard-step-dot {
    background: var(--wizard-success);
    border-color: var(--wizard-success);
    color: #fff;
}

/* Hide number and show checkmark when completed */
.wizard-step.completed .wizard-step-number {
    display: none;
}

.wizard-step.completed .wizard-step-dot::before {
    content: '✓';
    font-size: 14px;
    font-weight: 700;
}

.wizard-step.locked .wizard-step-dot {
    cursor: not-allowed;
}

/* Label positioned UNDER the dot */
.wizard-step-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wizard-step.active .wizard-step-label {
    color: #fff;
}

.wizard-step.completed .wizard-step-label {
    color: var(--wizard-success);
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30,144,255,0.5); }
    50% { box-shadow: 0 0 0 8px rgba(30,144,255,0); }
}

/* ============================================================
   MAIN LAYOUT - 50/50 Split
   ============================================================ */
.wizard-main {
    display: flex;
    min-height: calc(100vh - 64px);
}

.wizard-interactive-panel {
    flex: 0 0 50%;
    background: var(--wizard-bg-card);
    padding: 40px 48px;
    overflow-y: auto;
    border-right: 1px solid var(--wizard-border);
}

.wizard-preview-panel {
    flex: 0 0 50%;
    background: var(--wizard-bg-light);
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

/* ============================================================
   STEP CONTENT CONTAINER
   ============================================================ */
.wizard-step-content {
    display: none;
    max-width: 560px;
    margin: 0 auto;
}

.wizard-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Header */
.wizard-step-header {
    margin-bottom: 40px;
}

.wizard-step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wizard-step-title svg {
    width: 28px;
    height: 28px;
    color: var(--wizard-primary-accent);
}

.wizard-step-description {
    font-size: 15px;
    color: var(--wizard-text-secondary);
    margin: 0;
}

/* ============================================================
   STEP 1: FORMAT SELECTION
   ============================================================ */
.format-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.format-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid var(--wizard-border) !important;
    border-radius: var(--wizard-radius-lg) !important;
    padding: 28px 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all var(--wizard-transition) !important;
    position: relative !important;
    pointer-events: auto !important;
    z-index: 10 !important;
    display: block !important;
    user-select: none !important;
}

/* Ensure all children don't block clicks */
.format-card * {
    pointer-events: none !important;
}

.format-card:hover {
    border-color: var(--wizard-primary-accent) !important;
    box-shadow: 0 8px 24px rgba(30,144,255,0.15) !important;
    transform: translateY(-4px) !important;
    cursor: pointer !important;
}

.format-card.active {
    border-color: var(--wizard-primary-accent) !important;
    background: var(--wizard-primary-light) !important;
    background-color: var(--wizard-primary-light) !important;
    box-shadow: 0 0 0 4px rgba(30,144,255,0.15) !important;
}

/* Format Card SVG Icon */
.format-card-icon {
    width: 100%;
    height: 80px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-card-icon svg {
    height: 100%;
    width: auto;
    max-width: 100%;
}

.format-card-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
    margin-bottom: 4px;
}

.format-card-dimensions {
    font-size: 13px;
    color: var(--wizard-text-secondary);
    margin-bottom: 12px;
}

.format-card-capacity {
    display: inline-block;
    background: var(--wizard-primary-accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.format-card.active .format-card-capacity {
    background: var(--wizard-primary-dark);
    color: white;
}

.format-card-price {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wizard-text-muted);
}

.format-selection-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 16px;
    background: var(--wizard-warning-light);
    border-radius: var(--wizard-radius-md);
    font-size: 13px;
    color: var(--wizard-text-primary);
}

.format-selection-hint svg {
    width: 18px;
    height: 18px;
    color: var(--wizard-warning);
    flex-shrink: 0;
}

/* ============================================================
   FORM FIELDS - Styled like the example screenshot
   ============================================================ */
.wizard-form-group {
    margin-bottom: 24px;
}

.wizard-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wizard-primary-dark);
    margin-bottom: 6px;
}

.wizard-form-label svg {
    width: 16px;
    height: 16px;
    color: var(--wizard-primary-accent);
}

.wizard-form-label .required {
    color: var(--wizard-error);
    font-size: 14px;
    line-height: 1;
}

.wizard-form-label .optional-tag {
    font-weight: 400;
    font-size: 11px;
    color: var(--wizard-text-muted);
    margin-left: auto;
    text-transform: none;
}

.wizard-form-label .required-tag {
    font-weight: 700;
    font-size: 14px;
    color: #dc2626;
    margin-left: 4px;
}

/* Input styling like the screenshot - light blue background, bold text */
.wizard-form-input {
    width: 100%;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 14px 16px !important;
    border: 2px solid var(--wizard-input-border) !important;
    border-radius: var(--wizard-radius-md) !important;
    background: var(--wizard-input-bg) !important;
    color: var(--wizard-primary-dark) !important;
    transition: all var(--wizard-transition);
}

.wizard-form-input:focus {
    outline: none !important;
    border-color: var(--wizard-primary-accent) !important;
    box-shadow: 0 0 0 4px rgba(30,144,255,0.15) !important;
    background: #fff !important;
}

.wizard-form-input::placeholder {
    color: var(--wizard-text-muted) !important;
    font-weight: 400 !important;
}

/* Textarea specific */
textarea.wizard-form-input {
    min-height: 80px;
    resize: vertical;
}

/* Help text below inputs - yellow warning style like screenshot */
.wizard-form-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--wizard-text-primary);
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--wizard-warning-light);
    border-radius: var(--wizard-radius-md);
}

.wizard-form-hint svg {
    width: 16px;
    height: 16px;
    color: var(--wizard-warning);
    flex-shrink: 0;
    margin-top: 2px;
}

.wizard-form-hint.info {
    background: var(--wizard-primary-light);
}

.wizard-form-hint.info svg {
    color: var(--wizard-primary-accent);
}

/* ============================================================
   STEP 3: STYLE OPTIONS
   ============================================================ */
.style-section {
    margin-bottom: 32px;
}

.style-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.style-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--wizard-primary-accent);
}

.style-toggle-group {
    display: flex;
    gap: 12px;
}

.style-toggle-btn {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--wizard-border) !important;
    border-radius: var(--wizard-radius-md) !important;
    background: var(--wizard-bg-card) !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    text-align: center;
    transition: all var(--wizard-transition);
    color: var(--wizard-text-primary) !important;
}

.style-toggle-btn:hover {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
}

.style-toggle-btn.active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
}

/* WordPress nuclear overrides for style toggle buttons */
.ballot-wizard-wrapper .style-toggle-btn,
body .style-toggle-btn,
button.style-toggle-btn,
.ballot-wizard-wrapper button.style-toggle-btn {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .style-toggle-btn:hover,
body .style-toggle-btn:hover,
button.style-toggle-btn:hover {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .style-toggle-btn.active,
body .style-toggle-btn.active,
button.style-toggle-btn.active,
.style-toggle-btn.active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    color: #1e293b !important;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.15) !important;
}

.style-toggle-preview {
    font-size: 28px;
    font-weight: 500;
    color: var(--wizard-primary-dark);
    margin-bottom: 6px;
}

.style-toggle-btn[data-ballot-font="modern"] .style-toggle-preview {
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.style-toggle-btn[data-ballot-font="classic"] .style-toggle-preview {
    font-family: 'Times New Roman', Georgia, serif;
}

.style-toggle-label {
    font-size: 13px;
    color: var(--wizard-text-secondary);
}

/* Color Presets */
.color-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.color-preset {
    width: 48px;
    height: 48px;
    border-radius: var(--wizard-radius-md);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--wizard-transition);
    position: relative;
}

.color-preset:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.color-preset.active {
    border-color: var(--wizard-primary-dark);
}

.color-preset.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Custom Color Input */
.custom-color-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-color-input {
    width: 56px;
    height: 48px;
    padding: 4px;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    cursor: pointer;
}

.custom-color-hex {
    width: 120px;
}

/* ============================================================
   STEP 4: CANDIDATES
   ============================================================ */
.candidate-tabs {
    display: flex;
    gap: 4px;
    background: var(--wizard-bg-light);
    padding: 4px;
    border-radius: var(--wizard-radius-md);
    margin-bottom: 24px;
}

.candidate-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--wizard-radius-sm);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--wizard-text-secondary);
    cursor: pointer;
    transition: all var(--wizard-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.candidate-tab:hover {
    color: var(--wizard-primary-accent) !important;
    background: transparent !important;
}

.candidate-tab.active {
    background: var(--wizard-bg-card) !important;
    background-color: #ffffff !important;
    color: var(--wizard-primary-dark) !important;
    box-shadow: var(--wizard-shadow-sm) !important;
}

/* AGGRESSIVE WordPress overrides for candidate tabs */
.ballot-wizard-wrapper .candidate-tab,
body .candidate-tab,
#main .candidate-tab,
.entry-content .candidate-tab {
    border: none !important;
    border-radius: var(--wizard-radius-sm) !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--wizard-text-secondary) !important;
}

.ballot-wizard-wrapper .candidate-tab.active,
body .candidate-tab.active,
#main .candidate-tab.active,
.entry-content .candidate-tab.active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #09203b !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.ballot-wizard-wrapper .candidate-tab:hover,
body .candidate-tab:hover {
    color: #1e90ff !important;
    background: transparent !important;
    background-color: transparent !important;
}

.candidate-tab-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
    background: var(--wizard-bg-light) !important;
    background-color: #f1f5f9 !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--wizard-text-secondary) !important;
}

.candidate-tab.active .candidate-tab-badge {
    background: var(--wizard-primary-accent) !important;
    background-color: #1e90ff !important;
    color: white !important;
}

/* WordPress overrides for badge */
.ballot-wizard-wrapper .candidate-tab-badge,
body .candidate-tab-badge {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
}

.ballot-wizard-wrapper .candidate-tab.active .candidate-tab-badge,
body .candidate-tab.active .candidate-tab-badge {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    color: #ffffff !important;
}

/* Candidate Counter */
.candidate-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--wizard-bg-light);
    border-radius: var(--wizard-radius-md);
    margin-bottom: 20px;
}

.candidate-counter-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--wizard-text-primary);
}

.candidate-counter-text strong {
    font-size: 18px;
    color: var(--wizard-primary-accent);
}

.candidate-progress-bar {
    width: 100px;
    height: 6px;
    background: var(--wizard-border);
    border-radius: 3px;
    overflow: hidden;
}

.candidate-progress-fill {
    height: 100%;
    background: var(--wizard-primary-accent);
    border-radius: 3px;
    transition: width var(--wizard-transition);
}

.candidate-progress-fill.warning {
    background: var(--wizard-warning);
}

.candidate-progress-fill.error {
    background: var(--wizard-error);
}

/* Candidate Section */
.candidate-section {
    display: none;
}

.candidate-section.active {
    display: block;
}

/* Candidate List */
.candidate-list {
    margin-bottom: 16px;
}

.candidate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--wizard-bg-card);
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    margin-bottom: 8px;
    transition: all var(--wizard-transition);
}

.candidate-item:hover {
    border-color: var(--wizard-primary-accent) !important;
    box-shadow: var(--wizard-shadow-sm) !important;
}

.candidate-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wizard-primary-accent);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.candidate-info {
    flex: 1;
    min-width: 0;
}

.candidate-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--wizard-text-primary);
    margin-bottom: 1px;
}

.candidate-profession {
    font-size: 12px;
    color: var(--wizard-text-secondary);
}

.candidate-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.candidate-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius-sm);
    background: var(--wizard-bg-card);
    color: var(--wizard-text-secondary);
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.candidate-action-btn:hover {
    background: var(--wizard-primary-light) !important;
    border-color: var(--wizard-primary-accent) !important;
    color: var(--wizard-primary-accent) !important;
}

.candidate-action-btn.delete:hover {
    background: var(--wizard-error-light) !important;
    border-color: var(--wizard-error) !important;
    color: var(--wizard-error) !important;
}

.candidate-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.candidate-action-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* WordPress override for candidate action buttons */
.ballot-wizard-wrapper .candidate-action-btn,
body .candidate-action-btn,
button.candidate-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #64748b !important;
    cursor: pointer !important;
}

.ballot-wizard-wrapper .candidate-action-btn svg,
body .candidate-action-btn svg,
button.candidate-action-btn svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    flex-shrink: 0 !important;
    color: inherit !important;
    fill: currentColor !important;
}

/* Edit button uses stroke, not fill */
.candidate-action-btn[data-ballot-action="edit-candidate"] svg,
.candidate-action-btn[data-ballot-action="remove-candidate"] svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
}

.ballot-wizard-wrapper .candidate-action-btn:hover,
body .candidate-action-btn:hover {
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    border-color: #1e90ff !important;
    color: #1e90ff !important;
}

.ballot-wizard-wrapper .candidate-action-btn.delete:hover,
body .candidate-action-btn.delete:hover {
    background: #fef2f2 !important;
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.ballot-wizard-wrapper .candidate-action-btn:disabled,
body .candidate-action-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Empty State */
.candidate-empty-state {
    text-align: center;
    padding: 40px 24px;
    background: var(--wizard-bg-light);
    border: 2px dashed var(--wizard-border);
    border-radius: var(--wizard-radius-lg);
}

.candidate-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    color: var(--wizard-text-muted);
}

.candidate-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wizard-text-primary);
    margin-bottom: 4px;
}

.candidate-empty-text {
    font-size: 13px;
    color: var(--wizard-text-secondary);
    margin-bottom: 16px;
}

/* Add Candidate Button */
.add-candidate-btn {
    width: 100% !important;
    padding: 16px !important;
    border: 2px dashed var(--wizard-primary-accent) !important;
    border-radius: var(--wizard-radius-md) !important;
    background: var(--wizard-primary-light) !important;
    color: var(--wizard-primary-accent) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all var(--wizard-transition) !important;
    text-decoration: none !important;
}

.add-candidate-btn:hover {
    background: var(--wizard-primary-accent) !important;
    color: white !important;
    border-style: solid !important;
}

.add-candidate-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   STEP 5: EXPORT
   ============================================================ */
.bleed-options {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.bleed-option {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    background: var(--wizard-bg-card);
    text-align: center;
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.bleed-option:hover {
    border-color: var(--wizard-primary-accent) !important;
    background: var(--wizard-primary-light) !important;
}

.bleed-option.active {
    border-color: var(--wizard-primary-accent);
    background: var(--wizard-primary-light);
}

.bleed-option-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
}

.bleed-option-label {
    font-size: 11px;
    color: var(--wizard-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Bleed Input */
.bleed-custom-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.bleed-custom-input {
    width: 80px;
    text-align: center;
}

/* ============================================================
   PRINTING OPTIONS BANNER
   ============================================================ */
.printing-options-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius-lg);
    padding: 24px;
    margin-top: 32px;
    margin-bottom: 24px;
}

.printing-options-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.printing-options-header svg {
    width: 28px;
    height: 28px;
    color: var(--wizard-primary-dark);
}

.printing-options-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
}

.printing-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .printing-options-grid {
        grid-template-columns: 1fr;
    }
}

.printing-option {
    background: #ffffff;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.printing-option-self {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.printing-option-capmandat {
    border-color: var(--wizard-primary-accent);
    background: linear-gradient(135deg, #ffffff 0%, #e7f3ff 100%);
    box-shadow: 0 4px 16px rgba(30,144,255,0.15);
}

.printing-option-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--wizard-primary-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.printing-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.printing-option-self .printing-option-icon {
    background: var(--wizard-bg-light);
    color: var(--wizard-text-secondary);
}

.printing-option-capmandat .printing-option-icon {
    background: var(--wizard-primary-accent);
    color: white;
}

.printing-option-icon svg {
    width: 24px;
    height: 24px;
}

.printing-option-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
}

.printing-option-content p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--wizard-text-secondary);
    line-height: 1.5;
}

.printing-option-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.printing-option-features li {
    font-size: 13px;
    color: var(--wizard-text-secondary);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.printing-option-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--wizard-text-muted);
}

.printing-option-features.featured li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
    padding: 8px 0;
}

.printing-option-features.featured li::before {
    display: none;
}

.printing-option-features.featured li svg {
    width: 18px;
    height: 18px;
    color: var(--wizard-success);
    flex-shrink: 0;
    margin-top: 2px;
}

.printing-option-features.featured li span {
    flex: 1;
    color: var(--wizard-text-primary);
}

.printing-option-features.featured li strong {
    color: var(--wizard-primary-dark);
}

.printing-option-cta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding: 12px 20px !important;
    background: var(--wizard-primary-accent) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--wizard-radius-md) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.printing-option-cta:hover {
    background: #1a7fd4 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(30,144,255,0.3) !important;
}

.printing-option-cta svg {
    width: 18px;
    height: 18px;
}

.printing-options-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(30,144,255,0.08);
    border-radius: var(--wizard-radius-md);
    border-left: 3px solid var(--wizard-primary-accent);
}

.printing-options-note svg {
    width: 18px;
    height: 18px;
    color: var(--wizard-primary-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.printing-options-note p {
    margin: 0;
    font-size: 12px;
    color: var(--wizard-text-secondary);
    line-height: 1.6;
}

/* WordPress overrides for printing banner */
.ballot-wizard-wrapper .printing-option-cta,
body .printing-option-cta,
a.printing-option-cta {
    background: #1e90ff !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.ballot-wizard-wrapper .printing-option-cta:hover,
body .printing-option-cta:hover,
a.printing-option-cta:hover {
    background: #1a7fd4 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Export Button */
.export-btn {
    width: 100% !important;
    padding: 18px 32px !important;
    background: var(--wizard-success) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--wizard-radius-lg) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all var(--wizard-transition) !important;
    margin-top: 32px !important;
    text-decoration: none !important;
}

.export-btn:hover {
    background: #0d9668 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(16,185,129,0.4) !important;
    color: white !important;
}

.export-btn:disabled {
    background: var(--wizard-text-muted) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6 !important;
}

.export-btn svg {
    width: 22px;
    height: 22px;
}

/* ============================================================
   NAVIGATION BUTTONS - Strong !important for WordPress override
   ============================================================ */
.wizard-nav-buttons {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 48px !important;
    padding-top: 24px !important;
    border-top: 1px solid var(--wizard-border) !important;
}

/* Reset WordPress button styles completely */
.ballot-wizard-wrapper button,
.ballot-wizard-wrapper .wizard-nav-prev,
.ballot-wizard-wrapper .wizard-nav-next,
.ballot-wizard-wrapper .wizard-utility-btn,
.ballot-wizard-wrapper .export-btn {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

.wizard-nav-prev,
.wizard-nav-next {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    border-radius: var(--wizard-radius-md) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all var(--wizard-transition) !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.wizard-nav-prev,
.ballot-wizard-wrapper .wizard-nav-prev {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid var(--wizard-border) !important;
    color: var(--wizard-text-primary) !important;
}

.wizard-nav-prev:hover,
.ballot-wizard-wrapper .wizard-nav-prev:hover {
    border-color: var(--wizard-primary-accent) !important;
    color: var(--wizard-primary-accent) !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.wizard-nav-next,
.ballot-wizard-wrapper .wizard-nav-next {
    background: var(--wizard-primary-accent) !important;
    background-color: var(--wizard-primary-accent) !important;
    border: 2px solid var(--wizard-primary-accent) !important;
    color: #ffffff !important;
}

.wizard-nav-next:hover,
.ballot-wizard-wrapper .wizard-nav-next:hover {
    background: #1a7fd4 !important;
    background-color: #1a7fd4 !important;
    border-color: #1a7fd4 !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

.wizard-nav-next:disabled,
.ballot-wizard-wrapper .wizard-nav-next:disabled {
    background: #9ca3af !important;
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.7 !important;
}

.wizard-nav-prev svg,
.wizard-nav-next svg {
    width: 16px !important;
    height: 16px !important;
}

/* ============================================================
   PREVIEW PANEL
   ============================================================ */
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wizard-text-primary);
}

.preview-format-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--wizard-primary-accent);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Violation Banner */
.violation-banner {
    display: none;
    padding: 12px 16px;
    background: var(--wizard-warning-light);
    border: 1px solid var(--wizard-warning);
    border-radius: var(--wizard-radius-md);
    margin-bottom: 16px;
}

.violation-banner.visible {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.violation-banner svg {
    width: 18px;
    height: 18px;
    color: var(--wizard-warning);
    flex-shrink: 0;
    margin-top: 2px;
}

.violation-banner-content {
    flex: 1;
}

.violation-banner-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--wizard-text-primary);
    margin-bottom: 2px;
}

.violation-banner-text {
    font-size: 12px;
    color: var(--wizard-text-secondary);
}

.violation-banner-action {
    padding: 5px 10px;
    background: var(--wizard-warning);
    color: white;
    border: none;
    border-radius: var(--wizard-radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
}

.violation-banner-action:hover {
    background: #e08e0a !important;
}

/* Canvas Container */
.preview-canvas-container {
    background: white;
    border-radius: var(--wizard-radius-md);
    box-shadow: var(--wizard-shadow-md);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 200px;
    overflow: hidden;
}

.preview-canvas-container canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    border: 1px solid var(--wizard-border);
    object-fit: contain;
}

/* Ensure canvas maintains aspect ratio for all formats */
.preview-canvas-container canvas[data-format="A4"],
.preview-canvas-container canvas[data-format="A5"],
.preview-canvas-container canvas[data-format="A6"] {
    max-height: calc(100vh - 350px);
}

.preview-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--wizard-text-muted);
}

.preview-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 14px;
    margin: 0;
}

/* ============================================================
   CONFORMITY CHECKLIST - FLOATING
   ============================================================ */
.conformity-checklist {
    background: var(--wizard-bg-card);
    border-radius: var(--wizard-radius-lg);
    padding: 20px;
    box-shadow: var(--wizard-shadow-float);
    border: 1px solid var(--wizard-border);
    margin-top: auto;
}

.conformity-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conformity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.conformity-item:not(:last-child) {
    border-bottom: 1px solid var(--wizard-border);
}

.conformity-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conformity-icon svg {
    width: 12px;
    height: 12px;
}

.conformity-icon.valid {
    background: var(--wizard-success);
    color: white;
}

.conformity-icon.invalid {
    background: var(--wizard-border);
    color: var(--wizard-text-muted);
}

.conformity-icon.error {
    background: var(--wizard-error);
    color: white;
}

.conformity-icon.optional {
    background: var(--wizard-warning-light);
    color: var(--wizard-warning);
}

.conformity-text {
    font-size: 13px;
    color: var(--wizard-text-primary);
}

.conformity-text .optional-tag {
    font-size: 11px;
    color: var(--wizard-text-muted);
}

.conformity-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--wizard-radius-md);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.conformity-status.ready {
    background: var(--wizard-success-light);
    color: var(--wizard-success);
}

.conformity-status.not-ready {
    background: var(--wizard-warning-light);
    color: #b45309;
}

.conformity-status.has-errors {
    background: var(--wizard-error-light);
    color: var(--wizard-error);
}

/* ============================================================
   MODAL - Candidate Form
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.visible,
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--wizard-bg-card);
    border-radius: var(--wizard-radius-lg);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--wizard-border);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--wizard-primary-dark);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--wizard-bg-light);
    border-radius: 50%;
    color: var(--wizard-text-secondary);
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.modal-close:hover {
    background: var(--wizard-error-light) !important;
    color: var(--wizard-error) !important;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid var(--wizard-border);
}

.modal-btn {
    padding: 10px 20px !important;
    border-radius: var(--wizard-radius-md) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all var(--wizard-transition) !important;
    text-decoration: none !important;
}

.modal-btn-cancel {
    background: var(--wizard-bg-light) !important;
    border: 1px solid var(--wizard-border) !important;
    color: var(--wizard-text-primary) !important;
}

.modal-btn-cancel:hover {
    background: var(--wizard-bg-card) !important;
    border-color: var(--wizard-text-secondary) !important;
    color: var(--wizard-text-primary) !important;
}

.modal-btn-save {
    background: var(--wizard-primary-accent) !important;
    border: 1px solid var(--wizard-primary-accent) !important;
    color: white !important;
}

.modal-btn-save:hover {
    background: #1a7fd4 !important;
    border-color: #1a7fd4 !important;
    color: white !important;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--wizard-bg-card);
    border-radius: var(--wizard-radius-md);
    box-shadow: var(--wizard-shadow-lg);
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--wizard-primary-accent);
}

.toast.success { border-left-color: var(--wizard-success); }
.toast.error { border-left-color: var(--wizard-error); }
.toast.warning { border-left-color: var(--wizard-warning); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.dismissing {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--wizard-success); }
.toast.error .toast-icon { color: var(--wizard-error); }
.toast.warning .toast-icon { color: var(--wizard-warning); }
.toast.info .toast-icon { color: var(--wizard-primary-accent); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--wizard-text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--wizard-text-secondary);
}

.toast-dismiss {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--wizard-text-muted);
    cursor: pointer;
    border-radius: 4px;
}

.toast-dismiss:hover {
    background: var(--wizard-bg-light) !important;
    color: var(--wizard-text-primary) !important;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1199px) {
    .wizard-main {
        flex-direction: column;
    }
    
    .wizard-interactive-panel,
    .wizard-preview-panel {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .wizard-interactive-panel {
        padding: 32px;
    }
    
    .wizard-preview-panel {
        position: relative;
        height: auto;
        max-height: none;
        border-right: none;
        border-top: 1px solid var(--wizard-border);
    }
}

@media (max-width: 767px) {
    .wizard-header {
        padding: 0 16px !important;
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
    }
    
    .wizard-logo {
        height: 28px !important;
        max-height: 28px !important;
    }
    
    .wizard-step-label {
        display: none;
    }
    
    .wizard-step-dot {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .wizard-step:not(:last-child)::after {
        width: 30px;
    }
    
    .wizard-utility-btn span {
        display: none;
    }
    
    .wizard-interactive-panel {
        padding: 24px 16px;
    }
    
    .wizard-step-content {
        max-width: 100%;
    }
    
    .wizard-step-title {
        font-size: 20px;
    }
    
    .format-selection-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .style-toggle-group {
        flex-direction: column;
    }
    
    .bleed-options {
        flex-wrap: wrap;
    }
    
    .bleed-option {
        flex: 1 1 45%;
    }
    
    .wizard-nav-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .wizard-nav-prev,
    .wizard-nav-next {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden {
    display: none !important;
}

/* ============================================================
   FLOATING HELP BUTTON & MENU - Bottom Left
   ============================================================ */
.floating-help-container {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 999 !important;
}

.floating-help-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: #09203b !important;
    background-color: #09203b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(9,32,59,0.3) !important;
    transition: all 0.2s ease !important;
}

.floating-help-btn:hover,
.floating-help-btn.active {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(30,144,255,0.4) !important;
    text-decoration: none !important;
}

.floating-help-btn svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.floating-help-btn span {
    line-height: 1 !important;
}

/* Help Menu */
.help-menu {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: helpMenuSlideUp 0.2s ease;
}

.help-menu.active {
    display: block;
}

@keyframes helpMenuSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #09203b;
    color: #ffffff;
}

.help-menu-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.help-menu-close {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.help-menu-close svg {
    width: 16px;
    height: 16px;
}

.help-menu-close:hover {
    opacity: 0.7;
}

.help-menu-items {
    padding: 8px 0;
}

.help-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    color: #1e293b !important;
    font-size: 13px !important;
}

.help-menu-item:hover {
    background: #f1f5f9 !important;
}

.help-menu-item svg {
    width: 16px !important;
    height: 16px !important;
    color: #1e90ff !important;
    flex-shrink: 0 !important;
}

.help-menu-item span {
    flex: 1;
}

.help-menu-footer {
    border-top: 1px solid #e2e8f0;
    padding: 12px 16px;
}

.help-menu-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #64748b !important;
    font-size: 12px !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.help-menu-link:hover {
    color: #1e90ff !important;
    text-decoration: none !important;
}

.help-menu-link svg {
    width: 14px;
    height: 14px;
}

/* WordPress overrides for floating help */
.ballot-wizard-wrapper .floating-help-btn,
body .floating-help-btn,
button.floating-help-btn {
    background: #09203b !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.ballot-wizard-wrapper .floating-help-btn:hover,
body .floating-help-btn:hover,
button.floating-help-btn:hover,
.floating-help-btn.active {
    background: #1e90ff !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Move buttons larger icons */
.candidate-action-btn.move-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
}

.candidate-action-btn.move-btn svg {
    width: 20px !important;
    height: 20px !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   NUCLEAR WORDPRESS OVERRIDES - Highest specificity
   ============================================================ */

/* Override ALL button styling in the wizard wrapper */
.ballot-wizard-wrapper button[type="button"],
body .ballot-wizard-wrapper button,
#main .ballot-wizard-wrapper button,
.entry-content .ballot-wizard-wrapper button,
.ballot-wizard-wrapper .candidate-tab,
.ballot-wizard-wrapper .candidate-tab-badge,
.ballot-wizard-wrapper .add-candidate-btn {
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit !important;
}

/* Candidate tabs - nuclear override */
.ballot-wizard-wrapper button.candidate-tab,
body button.candidate-tab,
#main button.candidate-tab,
.entry-content button.candidate-tab,
button[data-ballot-list-tab] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    color: #64748b !important;
    box-shadow: none !important;
}

.ballot-wizard-wrapper button.candidate-tab.active,
body button.candidate-tab.active,
#main button.candidate-tab.active,
.entry-content button.candidate-tab.active,
button[data-ballot-list-tab].active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: none !important;
    color: #09203b !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Badges - nuclear override */
.ballot-wizard-wrapper .candidate-tab-badge,
body .candidate-tab-badge,
span.candidate-tab-badge,
[data-ballot-display="municipal-badge"],
[data-ballot-display="communautaire-badge"] {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: none !important;
    box-shadow: none !important;
}

.ballot-wizard-wrapper .candidate-tab.active .candidate-tab-badge,
body .candidate-tab.active .candidate-tab-badge,
button.candidate-tab.active .candidate-tab-badge,
button.candidate-tab.active span.candidate-tab-badge,
.candidate-tab.active [data-ballot-display="municipal-badge"],
.candidate-tab.active [data-ballot-display="communautaire-badge"] {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    color: #ffffff !important;
}

/* Add candidate button - nuclear override */
.ballot-wizard-wrapper .add-candidate-btn,
body .add-candidate-btn,
button.add-candidate-btn,
button[data-ballot-action="add-municipal-candidate"],
button[data-ballot-action="add-communautaire-candidate"] {
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    border: 2px dashed #1e90ff !important;
    border-color: #1e90ff !important;
    color: #1e90ff !important;
    box-shadow: none !important;
}

.ballot-wizard-wrapper .add-candidate-btn:hover,
body .add-candidate-btn:hover,
button.add-candidate-btn:hover,
button[data-ballot-action="add-municipal-candidate"]:hover,
button[data-ballot-action="add-communautaire-candidate"]:hover {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    border-color: #1e90ff !important;
    border-style: solid !important;
    color: #ffffff !important;
}

/* ============================================================
   GLOBAL WORDPRESS OVERRIDES - ALL INTERACTIVE ELEMENTS
   ============================================================ */

/* Bleed options */
.ballot-wizard-wrapper .bleed-option,
body .bleed-option,
button.bleed-option,
[data-ballot-bleed] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .bleed-option:hover,
body .bleed-option:hover,
button.bleed-option:hover,
[data-ballot-bleed]:hover {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
}

.ballot-wizard-wrapper .bleed-option.active,
body .bleed-option.active,
button.bleed-option.active,
[data-ballot-bleed].active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.15) !important;
}

/* Font selection buttons */
.ballot-wizard-wrapper [data-ballot-font],
body [data-ballot-font],
button[data-ballot-font] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper [data-ballot-font]:hover,
body [data-ballot-font]:hover,
button[data-ballot-font]:hover {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
}

.ballot-wizard-wrapper [data-ballot-font].active,
body [data-ballot-font].active,
button[data-ballot-font].active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.15) !important;
}

/* Mode selection buttons */
.ballot-wizard-wrapper [data-ballot-mode],
body [data-ballot-mode],
button[data-ballot-mode] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper [data-ballot-mode]:hover,
body [data-ballot-mode]:hover,
button[data-ballot-mode]:hover {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
}

.ballot-wizard-wrapper [data-ballot-mode].active,
body [data-ballot-mode].active,
button[data-ballot-mode].active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.15) !important;
}

/* Modal buttons */
.ballot-wizard-wrapper .modal-btn,
body .modal-btn,
button.modal-btn,
.modal-btn-cancel,
.modal-btn-save {
    text-decoration: none !important;
}

.ballot-wizard-wrapper .modal-btn-cancel,
body .modal-btn-cancel,
button.modal-btn-cancel,
[data-ballot-action="close-modal"].modal-btn {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .modal-btn-cancel:hover,
body .modal-btn-cancel:hover,
button.modal-btn-cancel:hover {
    background: #e2e8f0 !important;
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .modal-btn-save,
body .modal-btn-save,
button.modal-btn-save,
[data-ballot-action="save-candidate"] {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    border: 1px solid #1e90ff !important;
    color: #ffffff !important;
}

.ballot-wizard-wrapper .modal-btn-save:hover,
body .modal-btn-save:hover,
button.modal-btn-save:hover {
    background: #1a7fd4 !important;
    background-color: #1a7fd4 !important;
    color: #ffffff !important;
}

/* Export button */
.ballot-wizard-wrapper .export-btn,
body .export-btn,
button.export-btn,
[data-ballot-action="export-pdf"] {
    background: #10b981 !important;
    background-color: #10b981 !important;
    border: none !important;
    color: #ffffff !important;
}

.ballot-wizard-wrapper .export-btn:hover,
body .export-btn:hover,
button.export-btn:hover {
    background: #0d9668 !important;
    background-color: #0d9668 !important;
    color: #ffffff !important;
}

/* Navigation buttons */
.ballot-wizard-wrapper .wizard-nav-prev,
body .wizard-nav-prev,
button.wizard-nav-prev {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #64748b !important;
}

.ballot-wizard-wrapper .wizard-nav-prev:hover,
body .wizard-nav-prev:hover,
button.wizard-nav-prev:hover {
    border-color: #1e90ff !important;
    color: #1e90ff !important;
    background: #ffffff !important;
}

.ballot-wizard-wrapper .wizard-nav-next,
body .wizard-nav-next,
button.wizard-nav-next {
    background: #1e90ff !important;
    background-color: #1e90ff !important;
    border: none !important;
    color: #ffffff !important;
}

.ballot-wizard-wrapper .wizard-nav-next:hover,
body .wizard-nav-next:hover,
button.wizard-nav-next:hover {
    background: #1a7fd4 !important;
    background-color: #1a7fd4 !important;
    color: #ffffff !important;
}

/* Utility buttons in header */
.ballot-wizard-wrapper .wizard-utility-btn,
body .wizard-utility-btn,
button.wizard-utility-btn {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
}

.ballot-wizard-wrapper .wizard-utility-btn:hover,
body .wizard-utility-btn:hover,
button.wizard-utility-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.3) !important;
    color: #ffffff !important;
}

/* Format cards */
.ballot-wizard-wrapper .format-card,
body .format-card,
[data-ballot-format] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.ballot-wizard-wrapper .format-card:hover,
body .format-card:hover,
[data-ballot-format]:hover {
    border-color: #1e90ff !important;
    box-shadow: 0 8px 24px rgba(30,144,255,0.15) !important;
}

.ballot-wizard-wrapper .format-card.active,
body .format-card.active,
[data-ballot-format].active {
    border-color: #1e90ff !important;
    background: #e7f3ff !important;
    background-color: #e7f3ff !important;
    box-shadow: 0 0 0 4px rgba(30,144,255,0.15) !important;
}

/* Color presets - keep their background colors but fix border/shadow */
.ballot-wizard-wrapper .color-preset,
body .color-preset,
button.color-preset,
[data-ballot-color] {
    border: 3px solid transparent !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.ballot-wizard-wrapper .color-preset:hover,
body .color-preset:hover,
[data-ballot-color]:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.ballot-wizard-wrapper .color-preset.active,
body .color-preset.active,
[data-ballot-color].active {
    border-color: #09203b !important;
    box-shadow: 0 0 0 3px rgba(9,32,59,0.3) !important;
}
