@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@100..900&display=swap');

/* --- Reset --- */
*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) { all: unset; display: revert; }
*, *::before, *::after { box-sizing: border-box; }
html { -moz-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; }
a, button { cursor: revert; }
img { max-inline-size: 100%; max-block-size: 100%; }
input, textarea { -webkit-user-select: auto; }
textarea { white-space: revert; }
::placeholder { color: unset; }
:where([hidden]) { display: none; }

/* --- Brand Themes --- */
:root {
    --brand-color: #daa3ad;
    --brand-dark:  #C4607A;
    --gray-bg:     #f0f0f0;
    --white:       #ffffff;
    --text:        #333333;
    --border:      #ddd;
    --radius:      10px;
    --error-clr:   #d93025;
    --error-bg:    #fff5f5;
    --error-brd:   #ffaaaa;
}

body.brand-thalgo          { --brand-color: #006272; --brand-dark: #004d5a; }
body.brand-selvert-thermal { --brand-color: #5b9fce; --brand-dark: #2c7bb6; }

/* --- Base --- */
html, body, form { height: 100%; }
body {
    font-family: "Noto Sans Hebrew", sans-serif;
    direction: rtl;
    min-height: 100vh;
    color: var(--text);
}

/* --- Split background (fixed so it doesn't repeat on scroll) --- */
.split-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, var(--brand-color) 42%, var(--gray-bg) 42%);
    z-index: -1;
}

/* --- Page layout --- */
form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 16px 30px;
}

/* --- Logo --- */
.brand-logo {
    max-width: 180px;
    max-height: 75px;
    object-fit: contain;
    display: block;
    margin-bottom: 28px;
}

body.brand-labelle .brand-logo {
    filter: brightness(0) invert(1);
}

/* --- Form card --- */
.form-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13);
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
}

.form-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-dark);
    text-align: center;
    margin-bottom: 6px;
}

.form-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #777;
    text-align: center;
    margin-bottom: 24px;
}

/* --- Input fields --- */
.field-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-group input[type="text"],
.field-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: "Noto Sans Hebrew", sans-serif;
    color: var(--text);
    direction: rtl;
    text-align: right;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
}

.field-group input[type="text"]:focus,
.field-group textarea:focus {
    border-color: var(--brand-dark);
    background: var(--white);
    outline: none;
}

/* Validation highlight — very light red on the field */
.field-group input.field-error,
.field-group textarea.field-error {
    border-color: var(--error-brd);
    background: var(--error-bg);
}

.field-group textarea { resize: vertical; min-height: 100px; }

::placeholder { color: #aaa; font-family: "Noto Sans Hebrew", sans-serif; }

/* --- Validator messages --- */
.error-msg {
    display: block;
    color: var(--error-clr);
    font-size: 0.78rem;
    padding-right: 2px;
}

/* --- Radio group (pill toggle) --- */
.radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.radio-option       { display: flex; flex: 1; cursor: pointer; }
.radio-option input { display: none; }

.radio-option span {
    display: block;
    width: 100%;
    padding: 11px 8px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: "Noto Sans Hebrew", sans-serif;
    color: #666;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.18s;
}

.radio-option input:checked + span {
    border-color: var(--brand-color);
    background: var(--brand-dark);
    color: var(--white);
    font-weight: 700;
}

/* --- Consent checkbox row --- */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    cursor: pointer;
}

.consent-row i {
    font-size: 1.3rem;
    color: var(--brand-dark);
    margin-top: 1px;
    flex-shrink: 0;
}

.consent-row label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    flex: 1;
    cursor: pointer;
    line-height: 1.55;
}

/* --- Submit button --- */
.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--brand-dark);
    color: var(--white);
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: "Noto Sans Hebrew", sans-serif;
    transition: opacity 0.2s;
}

.btn-submit:hover { opacity: 0.88; }

/* --- Success message --- */
.alert-success { text-align: center; padding: 8px 0 12px; }

.alert-success h2 {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 10px;
}

.alert-success > p {
    display: block;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 26px;
}

/* --- Social follow section --- */
.social-follow {
    border-top: 1px solid #eee;
    padding-top: 22px;
    margin-top: 6px;
}

.social-invite {
    display: block;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 16px;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    transition: transform 0.2s, opacity 0.2s;
    text-decoration: none;
}

.social-icon:hover           { transform: scale(1.1); opacity: 0.9; }
.social-icon.facebook        { background: #1877f2; }
.social-icon.instagram       { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-icon.tiktok          { background: #010101; }

/* --- Error alert --- */
.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-brd);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--error-clr);
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
}

/* --- Footer --- */
.page-footer {
    text-align: center;
    padding: 14px 16px;
}

.page-footer p {
    color: #555;
    font-size: 0.78rem;
    display: block;
}

/* --- Mobile --- */
@media only screen and (max-width: 500px) {
    .split-bg       { background: linear-gradient(to bottom, var(--brand-color) 26%, var(--gray-bg) 26%); }
    .page-wrap      { padding: 28px 12px 20px; }
    .form-card      { padding: 24px 18px; border-radius: 14px; }
    .brand-logo     { max-width: 150px; max-height: 60px; margin-bottom: 20px; }
    .form-title     { font-size: 1.05rem; }
}
