/* public-register.css — page-specific styles for the multi-section registration form.
   Builds on public.css (page-container, page-card, public-message-bar).
   Responsive: mobile-first defaults + desktop refinements via min-width breakpoints. */

/* ====================== Card layout ====================== */
.page-card.page-card-wide {
    max-width: 820px;
    width: 100%;
    /* Mobile: tight padding so the card uses most of the screen. */
    padding: 18px 16px;
}

/* Title and subtitle */
.page-card h1 {
    text-align: center;
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.2;
}
.subtitle {
    text-align: center;
    color: #555;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.35;
}

/* ====================== Language switcher ====================== */
/* (visual rules live in public.css; here only adjustments specific to this page) */

/* ====================== Form sections ====================== */
.form-section {
    border: 1px solid #d8dde3;
    border-radius: 8px;
    padding: 12px 14px 14px;
    margin: 0 0 16px 0;
    background: #fafbfc;
}
.form-section > legend {
    padding: 0 8px;
    font-weight: 600;
    color: var(--brand-color, #003a70);
    font-size: 14px;
}
.form-section .form-group { margin-bottom: 12px; }
.form-section .form-group:last-child { margin-bottom: 0; }

/* Labels */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-color, #003a70);
}
.form-group .hint {
    font-weight: normal;
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}

/* ====================== Inputs ====================== */
/* Mobile default: font-size 16px to prevent iOS auto-zoom on focus.
   Touch target: min-height 44px (Apple HIG + WCAG AAA). */
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="tel"],
.form-section input[type="date"],
.form-section input[type="number"],
.form-section input[type="file"],
.form-section select,
.form-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.3;
    box-sizing: border-box;
    min-height: 44px;
    background: #fff;
}
.form-section textarea {
    min-height: 72px;
    resize: vertical;
}
.form-section input.field-error,
.form-section select.field-error {
    border-color: var(--error-color, #dc3545);
    background-color: #fff5f5;
}
.form-section select:disabled {
    background-color: #f0f0f0;
    color: #888;
    cursor: not-allowed;
}

/* File input — make the "Choose file" button comfortable on touch */
.form-section input[type="file"] {
    padding: 8px 10px;
}
.form-section input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 14px;
}

/* Form rows — single column on mobile by default */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.form-row .form-group-narrow { max-width: none; }

/* ====================== Photo block (top-of-form, centered) ====================== */
.photo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}
.photo-preview {
    width: 110px;
    height: 140px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    /* Placeholder icon (camera) shown when no image yet */
    background-image:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    transition: border-color 0.2s, background-color 0.2s;
}
.photo-preview { cursor: pointer; }
.photo-preview:hover { border-color: #94a3b8; background-color: #f1f5f9; }
.photo-preview.has-image { border-style: solid; background-image: none; }
.photo-preview.field-error {
    border-color: var(--error-color, #dc3545);
    background-color: #fff5f5;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-pick-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    background: var(--btn-secondary-bg, #1a6da8);
    color: var(--btn-text-color, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
    margin-bottom: 0;
}
.photo-pick-btn:hover { opacity: 0.9; }

.photo-hint {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}
.photo-hint .hint { display: block; font-size: 11px; margin-top: 2px; }

/* On desktop: a touch larger */
@media (min-width: 600px) {
    .photo-preview { width: 130px; height: 160px; }
}

/* ====================== reCAPTCHA ====================== */
/* Google widget is 304x78px. public.css applies a global scale(0.7) for narrow
   login cards — we override here because the registration card is wider. */
.recaptcha-container {
    margin: 16px 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* override public.css */
    transform: none;
    margin-right: 0;
}

/* ====================== Submit button area ====================== */
.page-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}
.page-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
}

/* ====================== Success panel ====================== */
.page-success {
    text-align: center;
    padding: 24px 12px;
}
.page-success h2 {
    color: var(--success-color, #28a745);
    margin: 0 0 12px;
    font-size: 22px;
}
.page-success p {
    color: #444;
    line-height: 1.5;
    font-size: 15px;
}

/* ====================== Small mobile (<= 380px) ====================== */
/* Squeeze further when there's really little room (older iPhones, narrow Androids). */
@media (max-width: 380px) {
    .page-card.page-card-wide { padding: 14px 12px; }
    .form-section { padding: 10px 12px 12px; }
    .page-card h1 { font-size: 18px; }
    .subtitle { font-size: 12px; }
    .recaptcha-container {
        transform: scale(0.85);
        transform-origin: top center;
        margin-bottom: 0;
        height: 70px;
    }
}

/* ====================== Tablet portrait & up (>= 600px) ====================== */
@media (min-width: 600px) {
    .page-card.page-card-wide {
        padding: 24px 28px;
    }
    .page-card h1 {
        font-size: 24px;
    }
    .subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }
    .form-section {
        padding: 14px 18px 18px;
        margin-bottom: 18px;
    }
    .form-section > legend {
        font-size: 15px;
    }
    /* 2-column form rows on tablet/desktop */
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .form-row .form-group-narrow { max-width: 130px; }
    /* Inputs a touch smaller on desktop (no zoom issue, more density) */
    .form-section input[type="text"],
    .form-section input[type="email"],
    .form-section input[type="tel"],
    .form-section input[type="date"],
    .form-section input[type="number"],
    .form-section input[type="file"],
    .form-section select,
    .form-section textarea {
        font-size: 14px;
        padding: 8px 10px;
        min-height: 38px;
        border-radius: 4px;
    }
    .form-section textarea { min-height: 64px; }
    /* Photo preview a bit larger and aligned left */
    .photo-preview {
        margin: 8px 0 0;
        width: 120px;
        height: 150px;
    }
    /* Submit button right-aligned and auto-width */
    .page-actions {
        justify-content: flex-end;
    }
    .page-actions .btn {
        width: auto;
        min-width: 160px;
        min-height: 40px;
        font-size: 15px;
        padding: 10px 20px;
    }
}

/* ====================== Desktop (>= 900px) ====================== */
@media (min-width: 900px) {
    .page-card.page-card-wide {
        padding: 28px 32px;
    }
    .page-card h1 { font-size: 26px; }
}

/* ================================================================
   THEME: European Aquatics-inspired — premium form sections,
   accent legend, animated submit. Overrides defaults above.
   ================================================================ */

/* --- Wider hero spacing on the registration card -----------------*/
.page-card.page-card-wide {
    padding-top: 60px; /* room for the absolute language switcher */
}

/* --- Form sections: white card-in-card with brand accent bar -----*/
.form-section {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 18px 14px;
    margin-bottom: 18px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.form-section:hover {
    box-shadow: 0 8px 20px -10px rgba(0, 58, 112, 0.18);
}
.form-section > legend {
    display: inline-block;
    background: linear-gradient(135deg, #003a70 0%, #1a6da8 100%);
    color: #ffffff;
    padding: 6px 16px 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px -4px rgba(0, 58, 112, 0.4);
    margin-left: -2px;
}

/* --- Inputs: subtle border, blue focus ring ----------------------*/
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="tel"],
.form-section input[type="date"],
.form-section input[type="number"],
.form-section select,
.form-section textarea {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
    outline: none;
    border-color: #1a6da8;
    box-shadow: 0 0 0 3px rgba(26, 109, 168, 0.18);
}
.form-section input.field-error,
.form-section select.field-error {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}
.form-section label {
    color: #1e293b;
    font-size: 13px;
    letter-spacing: 0.1px;
}

/* --- Photo block: aquatic accent on the preview frame ------------*/
.photo-preview {
    border-radius: 12px;
    border: 2px dashed #94c3e0;
    background-color: #f0f7fc;
    box-shadow: inset 0 1px 3px rgba(0, 58, 112, 0.06);
}
.photo-preview:hover {
    border-color: #1a6da8;
    background-color: #e3f2fd;
}
.photo-preview.has-image {
    border-color: #1a6da8;
    box-shadow: 0 6px 16px -6px rgba(0, 58, 112, 0.35);
}
.photo-pick-btn {
    background: linear-gradient(135deg, #1a6da8 0%, #0099d6 100%);
    box-shadow: 0 4px 12px -4px rgba(26, 109, 168, 0.5);
    border-radius: 999px;
    padding: 9px 22px;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.photo-pick-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px rgba(26, 109, 168, 0.6);
    opacity: 1;
}

/* --- Submit / reCAPTCHA section: cleaner card --------------------*/
.form-section:last-of-type {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.recaptcha-container {
    margin: 8px 0 12px;
}
.page-actions .btn,
.page-actions .btn-primary {
    background: linear-gradient(135deg, #003a70 0%, #1a6da8 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 18px -6px rgba(0, 58, 112, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.page-actions .btn:hover,
.page-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -6px rgba(0, 58, 112, 0.65);
}
.page-actions .btn:active,
.page-actions .btn-primary:active {
    transform: translateY(0);
}

/* --- Success panel: aquatic green + check icon -------------------*/
.page-success {
    padding: 36px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9f4 100%);
    border-radius: 12px;
    border: 1px solid #d4edda;
}
.page-success h2 {
    color: #198754;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
}
.page-success h2::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: -6px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23198754' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='8 12 11 15 16 9'/></svg>") center / contain no-repeat;
}
.page-success p {
    color: #475569;
    font-size: 15px;
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto;
}
.page-success p.page-success-hint {
    margin-top: 28px;
    font-size: 14px;
    color: #64748b;
}
.page-actions.page-actions-center {
    justify-content: center;
    margin-top: 18px;
}
.page-actions.page-actions-center .btn { min-width: 220px; }

/* --- Responsive refinements for the bold theme -------------------*/
@media (min-width: 600px) {
    .page-card.page-card-wide { padding-top: 50px; }
    .form-section { padding: 20px 22px 18px; }
    .form-section > legend { font-size: 13px; padding: 7px 18px; }
}
@media (max-width: 599px) {
    .page-card.page-card-wide { padding-top: 56px; }
    .form-section > legend { font-size: 11px; padding: 5px 12px; }
}

/* --- Phone number with separate country code (prefix + number) --- */
.phone-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.phone-input-group #PhoneCountryCode {
    flex: 0 0 130px;
    min-width: 110px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
.phone-input-group #PhoneNumber {
    flex: 1 1 auto;
}
@media (max-width: 480px) {
    .phone-input-group { flex-direction: column; gap: 6px; }
    .phone-input-group #PhoneCountryCode { flex: 1 1 auto; }
}

/* --- Coverage Information: radio group + textarea --- */
.form-group-full { flex: 1 1 100%; }
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.radio-option:hover {
    background: #f5f7fa;
}
.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: auto;
}
.hint {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}
.form-group textarea {
    width: 100%;
    min-height: 90px;
    font-family: inherit;
    font-size: inherit;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}
