/**
 * Trainer Registration Page — Premium Styles
 * Multi-step form with glassmorphism, progress bar, and animations.
 * Depends on: auth-variables.css, auth-shared.css
 *
 * @package FitnessCoachPro
 * @since   5.2.0 — SaaS Trainer Onboarding
 */

/* ============================================================================
   BODY OVERRIDE
   ============================================================================ */
body.fcp-trainer-register-page {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--duo-bg-deep);
    color: var(--duo-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================================================
   WRAPPER — overrides shared auth-shared.css for wider layout
   ============================================================================ */
.fcp-trainer-register-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.fcp-trainer-register-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 680px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(168, 85, 247, 0.15);
    animation: containerSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   PROGRESS BAR
   ============================================================================ */
.fcp-step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
    padding: 0 10px;
}

.fcp-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--duo-bg-light);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--duo-text-muted);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.fcp-step-dot.active {
    background: linear-gradient(135deg, var(--duo-purple), var(--duo-purple-dark));
    border-color: var(--duo-purple);
    color: #fff;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    transform: scale(1.15);
}

.fcp-step-dot.completed {
    background: linear-gradient(135deg, var(--duo-green), var(--duo-green-dark));
    border-color: var(--duo-green);
    color: #fff;
    box-shadow: 0 0 15px var(--duo-green-glow);
}

.fcp-step-line {
    flex: 1;
    height: 3px;
    background: var(--glass-border);
    transition: background 0.4s ease;
    min-width: 30px;
}

.fcp-step-line.completed {
    background: linear-gradient(90deg, var(--duo-green), var(--duo-purple));
}

/* ============================================================================
   STEP PANELS
   ============================================================================ */
.fcp-form-step {
    display: none;
    animation: stepFadeIn 0.4s ease;
}

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

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================================
   SECTION HEADERS (per step)
   ============================================================================ */
.fcp-step-header {
    text-align: center;
    margin-bottom: 28px;
}

.fcp-step-header .step-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.3));
}

.fcp-step-header .step-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.fcp-step-header .step-desc {
    font-size: 14px;
    color: var(--duo-text-muted);
    font-weight: 500;
}

/* ============================================================================
   FORM LAYOUT EXTENSIONS
   ============================================================================ */
.fcp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.fcp-form-group {
    margin-bottom: 20px;
}

.fcp-form-row .fcp-form-group {
    margin-bottom: 0;
}

/* ============================================================================
   TEXTAREA
   ============================================================================ */
textarea.fcp-input {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* ============================================================================
   SELECT
   ============================================================================ */
select.fcp-input {
    appearance: none;
    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='%236b8a97' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    padding-inline-end: 40px;
    cursor: pointer;
}

/* ============================================================================
   SPECIALIZATIONS GRID (Checkbox Tags)
   ============================================================================ */
.fcp-specializations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.fcp-spec-tag {
    position: relative;
}

.fcp-spec-tag input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fcp-spec-tag label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(15, 26, 31, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--duo-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.fcp-spec-tag label:hover {
    border-color: var(--duo-purple);
    background: rgba(168, 85, 247, 0.1);
}

.fcp-spec-tag input:checked + label {
    border-color: var(--duo-purple);
    background: rgba(168, 85, 247, 0.2);
    color: #fff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.fcp-spec-tag input:checked + label::after {
    content: '✓';
    margin-inline-start: auto;
    font-size: 14px;
    font-weight: 800;
    color: var(--duo-purple);
}

/* ============================================================================
   FILE UPLOAD DROPZONE
   ============================================================================ */
.fcp-file-upload {
    position: relative;
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    background: rgba(15, 26, 31, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.fcp-file-upload:hover {
    border-color: var(--duo-purple);
    background: rgba(168, 85, 247, 0.08);
}

.fcp-file-upload.has-files {
    border-color: var(--duo-green);
    background: rgba(88, 204, 2, 0.08);
}

.fcp-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.fcp-file-upload .upload-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.7;
}

.fcp-file-upload .upload-text {
    font-size: 14px;
    color: var(--duo-text-muted);
    font-weight: 600;
}

.fcp-file-upload .upload-hint {
    font-size: 12px;
    color: var(--duo-text-muted);
    opacity: 0.6;
    margin-top: 6px;
}

/* File Preview List */
.fcp-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fcp-file-preview-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(88, 204, 2, 0.15);
    border: 1px solid var(--duo-green);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--duo-green);
    font-weight: 600;
}

/* Profile Photo Preview */
.fcp-photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--duo-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    margin: 12px auto 0;
    display: none;
}

.fcp-photo-preview.visible {
    display: block;
}

/* ============================================================================
   TERMS & CONDITIONS BOX
   ============================================================================ */
.fcp-terms-box {
    background: rgba(15, 26, 31, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--duo-text-secondary);
    line-height: 1.7;
}

.fcp-terms-box::-webkit-scrollbar {
    width: 6px;
}

.fcp-terms-box::-webkit-scrollbar-track {
    background: transparent;
}

.fcp-terms-box::-webkit-scrollbar-thumb {
    background: var(--duo-text-muted);
    border-radius: 3px;
}

.fcp-terms-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.fcp-terms-checkbox:hover {
    border-color: var(--duo-purple);
}

.fcp-terms-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--duo-purple);
    flex-shrink: 0;
}

.fcp-terms-checkbox .terms-label {
    font-size: 14px;
    color: var(--duo-text-secondary);
    font-weight: 600;
    line-height: 1.5;
}

.fcp-terms-checkbox .terms-label a {
    color: var(--duo-purple);
    text-decoration: none;
    font-weight: 700;
}

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

/* ============================================================================
   NAVIGATION BUTTONS
   ============================================================================ */
.fcp-step-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.fcp-btn-step {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fcp-btn-prev {
    background: var(--duo-bg-light);
    color: var(--duo-text-secondary);
    border: 2px solid var(--glass-border);
    flex: 0 0 auto;
    min-width: 120px;
}

.fcp-btn-prev:hover {
    background: var(--duo-bg-elevated);
    border-color: var(--duo-text-muted);
    transform: translateY(-2px);
}

.fcp-btn-next {
    background: linear-gradient(135deg, var(--duo-purple), var(--duo-purple-dark));
    color: white;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 0 20px rgba(168, 85, 247, 0.3);
}

.fcp-btn-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 0 30px rgba(168, 85, 247, 0.5);
}

.fcp-btn-next:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* Submit button (Step 4) */
.fcp-btn-submit {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--duo-green), var(--duo-green-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-btn), var(--shadow-glow-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    margin-top: 12px;
}

.fcp-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-btn), var(--shadow-glow-green), var(--shadow-lg);
    background: linear-gradient(135deg, var(--duo-green-light), var(--duo-green));
}

.fcp-btn-submit:active {
    transform: translateY(-1px);
}

.fcp-btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* ============================================================================
   INPUT HINT
   ============================================================================ */
.input-hint {
    font-size: 12px;
    color: var(--duo-text-muted);
    margin-top: 6px;
    font-weight: 500;
    opacity: 0.7;
}

/* ============================================================================
   REGISTRATION CLOSED STATE
   ============================================================================ */
.fcp-registration-closed {
    text-align: center;
    padding: 60px 30px;
}

.fcp-registration-closed .closed-icon {
    font-size: 72px;
    display: block;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 16px rgba(168, 85, 247, 0.4));
}

.fcp-registration-closed .closed-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}

.fcp-registration-closed .closed-desc {
    font-size: 15px;
    color: var(--duo-text-muted);
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto 28px;
}

/* Waitlist form */
.fcp-waitlist-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.fcp-waitlist-form .fcp-input {
    flex: 1;
}

.fcp-waitlist-form .fcp-btn-waitlist {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--duo-purple), var(--duo-purple-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 800;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fcp-waitlist-form .fcp-btn-waitlist:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* ============================================================================
   TRAINER REGISTER LINK (on login page)
   ============================================================================ */
.fcp-trainer-register-link {
    text-align: center;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fcp-trainer-register-link .link-text {
    font-size: 13px;
    color: var(--duo-text-muted);
    font-weight: 600;
}

.fcp-trainer-register-link .link-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--duo-purple);
    text-decoration: none;
    transition: all 0.3s ease;
}

.fcp-trainer-register-link .link-action:hover {
    color: var(--duo-purple-dark);
    gap: 10px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 640px) {
    .fcp-trainer-register-container {
        padding: 28px 20px;
        margin: 10px;
    }

    .fcp-form-row {
        grid-template-columns: 1fr;
    }

    .fcp-specializations-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fcp-step-dot {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .fcp-step-header .step-title {
        font-size: 20px;
    }

    .fcp-waitlist-form {
        flex-direction: column;
    }

    .fcp-step-nav {
        flex-direction: column-reverse;
    }

    .fcp-btn-prev {
        min-width: unset;
    }
}

@media (max-width: 380px) {
    .fcp-specializations-grid {
        grid-template-columns: 1fr;
    }
}
