﻿/* 
   FORM  Registration page
    */

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 
   SPLIT-SCREEN LAYOUT
   fp-layout: full-viewport flex row
   fp-left:   scrollable form panel (~38%)
   fp-right:  sticky photo panel (remaining)
    */
.fp-layout {
    display: flex;
    min-height: 100vh;
}

/* Left panel */
.fp-left {
    width: 38%;
    min-width: 360px;
    max-width: 620px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    position: relative;
    z-index: 1;
}

/* Right panel — always fixed to viewport, never overflows */
.fp-right {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100vw - min(620px, 38%));
    background-color: #fff;
    background-image: var(--fp-bg);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Per-sport backgrounds via CSS variable (used by ::before and ::after) */
[data-sport="padel"]        { --fp-bg: url('/images/bg/padel.jpg'); }
[data-sport="badminton"]    { --fp-bg: url('/images/bg/badminton.jpg'); }
[data-sport="tennis"]       { --fp-bg: url('/images/bg/tennis.jpg'); }
[data-sport="table_tennis"] { --fp-bg: url('/images/bg/table_tennis.jpg'); }
[data-sport="squash"]       { --fp-bg: url('/images/bg/squash.jpg'); }
[data-sport="pickleball"]   { --fp-bg: url('/images/bg/pickleball.jpg'); }
[data-sport="other"],
html                        { --fp-bg: url('/images/bg/other.jpg'); }

/* Sport accent colors */
[data-sport="padel"]        { --accent: #ed4c6d; }
[data-sport="badminton"]    { --accent: #ed4c6d; }
[data-sport="tennis"]       { --accent: #ed4c6d; }
[data-sport="table_tennis"] { --accent: #ed4c6d; }
[data-sport="squash"]       { --accent: #ed4c6d; }
[data-sport="pickleball"]   { --accent: #ed4c6d; }
[data-sport="other"],
html                        { --accent: #ed4c6d; }

/* 
   CARD (inside fp-left)
    */
.fp-card {
    padding: 2.5rem 2.5rem 3rem;
    width: 100%;
}

/* 
   CARD CONTENTS
    */

/* Language switcher  fixed top-right */
.fp-lang {
    position: fixed;
    top: 0.85rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}
.fp-lang-btn {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.fp-lang-btn:hover {
    color: var(--accent, #4f46e5);
    background: rgba(0,0,0,0.04);
}
.fp-lang-btn.is-active {
    color: var(--accent, #4f46e5);
    background: rgba(0,0,0,0.05);
}

/* Logo */
.fp-logo {
    margin-bottom: 1.25rem;
}
.fp-logo-placeholder {
    color: var(--accent, #4f46e5);
    opacity: 1;
}

/* Title */
.fp-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

/* Meta (date, count) */
.fp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.fp-meta-item {
    font-size: 0.88rem;
    color: #4a5568;
    background: #f7fafc;
    border-radius: 6px;
    padding: 0.25em 0.75em;
    border: 1px solid #e2e8f0;
}

/* Description (Quill output) */
.fp-desc {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* Quill output fix */
.fp-desc .ql-ui { display: none; }
.fp-desc ol, .fp-desc ul { padding-left: 1.5em; margin: 0.4em 0; }
.fp-desc li[data-list="bullet"] { list-style-type: disc; }
.fp-desc li[data-list="ordered"] { list-style-type: decimal; }
.fp-desc ol { list-style: none; }
.fp-desc ol li[data-list="bullet"] { list-style-type: disc; }

/* Status bar */
.fp-status-bar {
    margin-bottom: 0.5rem;
}
.fp-list-link {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent, #4f46e5);
    text-decoration: none;
    margin-bottom: 0.4rem;
}
.fp-list-link:hover { text-decoration: underline; }

.fp-warning {
    font-size: 0.78rem;
    color: #c53030;
    background: #fff5f5;
    border-left: 3px solid #fc8181;
    padding: 0.3em 0.75em;
    border-radius: 0 4px 4px 0;
    margin: 0;
}

/* Divider */
.fp-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.25rem 0;
}

/* Notification */
.fp-notification {
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

/* Form fields */
.fp-form .label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.3rem;
}
.fp-form .input {
    border-radius: 8px;
    border-color: #cbd5e0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fp-form .input:focus {
    border-color: var(--accent, #4f46e5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.fp-hint {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.35rem !important;
}

/* Submit button */
.fp-btn-submit {
    background: #fff;
    color: #363636;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid #363636;
    border-radius: 5px;
    padding: 0.65em 2em;
    height: 2.5em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fp-btn-submit:hover {
    background: #363636;
    color: #fff;
}
.fp-btn-submit:active { transform: scale(0.98); }

/* 
   RESPONSIVE
    */

/* Narrow desktop (<1470px): form takes full width, image becomes full background */
@media (max-width: 1470px) {
    .fp-left {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        background: transparent;
    }
    .fp-card {
        background: rgba(255,255,255,0.25);
        /* backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px); */
        border-radius: 12px;
        box-shadow: 0 4px 32px rgba(0,0,0,0.08);
        margin: 2rem auto;
        max-width: 560px;
    }
    .fp-right {
        width: 100%;
        background-size: cover;
        opacity: 0.12;
        pointer-events: none;
    }
}

/* Tablet (<860px): slightly more transparent */
@media (max-width: 860px) {
    .fp-right {
        opacity: 0.08;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .fp-card {
        padding: 1.5rem 1.25rem 2.5rem;
    }
    .fp-title { font-size: 1.3rem; }
}