/* ═══════════════════════════════════════════
   Zuz BaMachol — Passover Registration Form
   ═══════════════════════════════════════════ */

:root {
    --zuz-primary: #1a1a2e;
    --zuz-accent: #e94560;
    --zuz-accent-hover: #d63050;
    --zuz-accent-light: rgba(233, 69, 96, 0.1);
    --zuz-gold: #f5a623;
    --zuz-bg: #f8f9fc;
    --zuz-card-bg: #ffffff;
    --zuz-text: #2c3e50;
    --zuz-text-light: #7f8c8d;
    --zuz-border: #e0e4ec;
    --zuz-success: #27ae60;
    --zuz-error: #e74c3c;
    --zuz-radius: 12px;
    --zuz-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --zuz-transition: 0.3s ease;
}

/* Reset & Container */
.zuz-registration {
    font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', sans-serif;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: var(--zuz-text);
    direction: rtl;
    line-height: 1.6;
}

.zuz-registration *,
.zuz-registration *::before,
.zuz-registration *::after {
    box-sizing: border-box;
}

/* ─── Progress Bar ─── */
.zuz-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 0;
}

.zuz-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
}

.zuz-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--zuz-border);
    color: var(--zuz-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--zuz-transition);
}

.zuz-progress-step.active .zuz-step-number {
    background: var(--zuz-accent);
    color: #fff;
    box-shadow: 0 0 0 4px var(--zuz-accent-light);
}

.zuz-progress-step.completed .zuz-step-number {
    background: var(--zuz-success);
    color: #fff;
}

.zuz-step-label {
    font-size: 0.75rem;
    color: var(--zuz-text-light);
    white-space: nowrap;
    transition: color var(--zuz-transition);
}

.zuz-progress-step.active .zuz-step-label {
    color: var(--zuz-accent);
    font-weight: 600;
}

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

.zuz-progress-line {
    flex: 1;
    height: 3px;
    background: var(--zuz-border);
    margin: 0 0.5rem;
    margin-bottom: 1.4rem;
    transition: background var(--zuz-transition);
}

.zuz-progress-line.completed {
    background: var(--zuz-success);
}

/* ─── Steps ─── */
.zuz-step {
    background: var(--zuz-card-bg);
    border-radius: var(--zuz-radius);
    padding: 2rem;
    box-shadow: var(--zuz-shadow);
    animation: zuz-fadeIn 0.4s ease;
}

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

.zuz-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--zuz-primary);
    margin: 0 0 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--zuz-accent);
    display: inline-block;
}

.zuz-subtitle {
    color: var(--zuz-text-light);
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

/* ─── Form Fields ─── */
.zuz-field {
    margin-bottom: 1.25rem;
}

.zuz-registration .zuz-field label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    margin-bottom: 0.4rem !important;
    font-size: 0.95rem !important;
    color: var(--zuz-text) !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    text-indent: 0 !important;
}

.zuz-required {
    color: var(--zuz-accent);
}

.zuz-field input[type="text"],
.zuz-field input[type="tel"],
.zuz-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--zuz-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--zuz-text);
    background: var(--zuz-bg);
    transition: border-color var(--zuz-transition), box-shadow var(--zuz-transition);
    -webkit-appearance: none;
    appearance: none;
}

.zuz-field input:focus,
.zuz-field select:focus {
    outline: none;
    border-color: var(--zuz-accent);
    box-shadow: 0 0 0 3px var(--zuz-accent-light);
}

.zuz-field input.zuz-invalid,
.zuz-field select.zuz-invalid {
    border-color: var(--zuz-error);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.zuz-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.zuz-field-error {
    color: var(--zuz-error);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: none;
}

.zuz-field-error.visible {
    display: block;
}

/* ─── Workshop Cards ─── */
.zuz-workshop-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.zuz-workshop-card {
    display: block;
    cursor: pointer;
    border: 2px solid var(--zuz-border);
    border-radius: var(--zuz-radius);
    padding: 1.25rem;
    transition: all var(--zuz-transition);
    position: relative;
    background: var(--zuz-bg);
}

.zuz-workshop-card:hover {
    border-color: var(--zuz-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.1);
}

.zuz-workshop-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.zuz-workshop-card input[type="checkbox"]:checked + .zuz-card-content {
    /* Handled via JS class on parent */
}

.zuz-workshop-card.selected {
    border-color: var(--zuz-accent);
    background: var(--zuz-accent-light);
    box-shadow: 0 0 0 3px var(--zuz-accent-light);
}

.zuz-workshop-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.zuz-workshop-card.zuz-locked {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f0f0f0;
    border-color: #ccc;
    position: relative;
}

.zuz-workshop-card.zuz-locked:hover {
    transform: none;
    box-shadow: none;
    border-color: #ccc;
}

.zuz-card-locked-badge {
    background: var(--zuz-error);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    white-space: nowrap;
}

.zuz-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zuz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zuz-card-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--zuz-primary);
}

.zuz-card-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--zuz-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: transparent;
    transition: all var(--zuz-transition);
    flex-shrink: 0;
}

.zuz-workshop-card.selected .zuz-card-check {
    background: var(--zuz-accent);
    border-color: var(--zuz-accent);
    color: #fff;
}

.zuz-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--zuz-text-light);
}

.zuz-card-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ─── Selection Counter ─── */
.zuz-selection-counter {
    background: var(--zuz-primary);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.25rem;
}

#zuz-counter {
    color: var(--zuz-gold);
    font-size: 1.1rem;
}

/* ─── Buttons ─── */
.zuz-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.zuz-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--zuz-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.zuz-btn-next,
.zuz-btn-submit {
    background: var(--zuz-accent);
    color: #fff;
    flex: 1;
    justify-content: center;
}

.zuz-btn-next:hover,
.zuz-btn-submit:hover {
    background: var(--zuz-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.zuz-btn-back {
    background: transparent;
    color: var(--zuz-text-light);
    border: 2px solid var(--zuz-border);
}

.zuz-btn-back:hover {
    border-color: var(--zuz-text-light);
    color: var(--zuz-text);
}

.zuz-btn-submit {
    background: var(--zuz-success);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.zuz-btn-submit:hover {
    background: #219a52;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.zuz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─── Summary ─── */
.zuz-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.zuz-summary-section {
    background: var(--zuz-bg);
    border-radius: var(--zuz-radius);
    padding: 1.25rem;
}

.zuz-summary-section h3 {
    font-size: 1.1rem;
    color: var(--zuz-primary);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--zuz-border);
}

.zuz-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.zuz-summary-row span {
    color: var(--zuz-text-light);
}

.zuz-summary-workshop {
    background: var(--zuz-card-bg);
    border: 1px solid var(--zuz-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.zuz-summary-workshop .ws-name {
    font-weight: 700;
    color: var(--zuz-primary);
}

.zuz-summary-workshop .ws-details {
    font-size: 0.85rem;
    color: var(--zuz-text-light);
    margin-top: 0.25rem;
}

/* ─── Messages ─── */
.zuz-message {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--zuz-radius);
    box-shadow: var(--zuz-shadow);
    animation: zuz-fadeIn 0.5s ease;
}

.zuz-message-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.zuz-message h2 {
    margin: 0 0 0.5rem;
    color: var(--zuz-primary);
}

.zuz-message p {
    color: var(--zuz-text-light);
    margin: 0 0 1.5rem;
}

.zuz-message-success {
    background: linear-gradient(135deg, #f0fff4, #e8f5e9);
    border: 2px solid var(--zuz-success);
}

.zuz-message-error {
    background: linear-gradient(135deg, #fff5f5, #fce4e4);
    border: 2px solid var(--zuz-error);
}

/* ─── Loading ─── */
.zuz-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #fff;
    font-size: 1.1rem;
}

.zuz-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--zuz-accent);
    border-radius: 50%;
    animation: zuz-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .zuz-registration {
        margin: 1rem auto;
    }

    .zuz-step {
        padding: 1.25rem;
    }

    .zuz-step-title {
        font-size: 1.25rem;
    }

    .zuz-progress {
        margin-bottom: 1.5rem;
    }

    .zuz-step-number {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .zuz-step-label {
        font-size: 0.65rem;
    }

    .zuz-card-details {
        flex-direction: column;
        gap: 0.3rem;
    }

    .zuz-actions {
        flex-direction: column-reverse;
    }

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

    .zuz-summary-row {
        flex-direction: column;
        gap: 0.2rem;
    }
}
