/* ============================================================
   tin-account :: Frontend styling (original Tindoro brand)
   ============================================================
   Color tokens are injected inline via wp_add_inline_style
   (see core.php) using CSS custom properties.
   ============================================================ */

.tin-acc-wrap {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .tin-acc-wrap { margin: 24px auto; padding: 0 12px; }
}

/* === TABS === */
.tin-acc-tabs {
    display: flex;
    margin: 0 0 28px;
    overflow: hidden;
    background: #e8e8e8;
}
.tin-acc-tab {
    flex: 1;
    padding: 20px 18px;
    background: #e8e8e8;
    color: #666;
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0;
    transition: background .15s, color .15s;
    border: 0;
    font-family: inherit;
    line-height: 1.1;
    margin: 0;
    box-shadow: none;
}
.tin-acc-tab:hover:not(.is-active) {
    background: #dcdcdc;
    color: #333;
}
.tin-acc-tab.is-active {
    background: var(--tin-account-primary, #475141);
    color: #fff;
    cursor: default;
}
/* Tabs as link (lost-password sub-page) */
a.tin-acc-tab {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === PANELS === */
.tin-acc-panel { display: block; }
.tin-acc-panel[hidden] { display: none; }

/* === FORMS === */
.tin-acc-form {
    margin: 0;
    padding: 0;
}

/* === FIELD WRAPPER === */
.tin-acc-field {
    position: relative;
    margin: 0 0 16px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* === ICON BOX (left, white square with dark icon) === */
.tin-acc-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
    color: #555;
}
.tin-acc-icon svg {
    width: 20px;
    height: 20px;
}

/* === INPUT (the gray bar) — !important to scavalcare Enfold theme === */
.tin-acc-input,
.tin-acc-wrap input.tin-acc-input,
.tin-acc-wrap input[type="text"].tin-acc-input,
.tin-acc-wrap input[type="email"].tin-acc-input,
.tin-acc-wrap input[type="password"].tin-acc-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 18px 50px 18px 78px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: var(--tin-account-input-bg, #e8e8e8) !important;
    background-image: none !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    height: 64px !important;
    min-height: 64px !important;
    transition: background-color .15s;
    color: #333 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    text-indent: 0 !important;
}
.tin-acc-input:focus {
    background-color: var(--tin-account-focus-bg, #e8eef5) !important;
    box-shadow: none !important;
    outline: none !important;
}
.tin-acc-input::placeholder {
    color: #888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* === REQUIRED ASTERISK === */
.tin-acc-req {
    position: absolute;
    right: 10px;
    top: 6px;
    color: #999;
    font-size: 13px;
    line-height: 1;
    z-index: 4;
    pointer-events: none;
}

/* === PASSWORD TOGGLE === */
.tin-acc-field--password .tin-acc-input { padding-right: 50px !important; }
.tin-acc-pwtog {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: color .12s;
    box-sizing: border-box;
}
.tin-acc-pwtog:hover {
    color: var(--tin-account-primary, #475141);
}
.tin-acc-pwtog svg {
    width: 22px;
    height: 22px;
}

/* === HALF-WIDTH ROW (first/last name) === */
.tin-acc-row-half {
    display: flex;
    gap: 12px;
    margin: 0 0 16px;
}
.tin-acc-row-half > .tin-acc-field {
    flex: 1;
    margin: 0;
}
@media (max-width: 540px) {
    .tin-acc-row-half { flex-direction: column; gap: 0; }
    .tin-acc-row-half > .tin-acc-field { margin-bottom: 16px; }
}

/* === REMEMBER ME + FORGOT === */
.tin-acc-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
    font-size: 14px;
    flex-wrap: wrap;
}
.tin-acc-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #444;
    cursor: pointer;
    line-height: 1.3;
    margin: 0;
}
.tin-acc-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--tin-account-primary, #475141);
    cursor: pointer;
}
.tin-acc-lostpw {
    color: var(--tin-account-primary, #475141);
    text-decoration: none;
    font-weight: 500;
}
.tin-acc-lostpw:hover { text-decoration: underline; }

/* === CHECKBOX ROW (Terms / Newsletter) === */
.tin-acc-checkrow {
    position: relative;
    margin: 14px 0;
    padding: 0;
}
.tin-acc-checkrow .tin-acc-check {
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #333;
}
.tin-acc-checkrow .tin-acc-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}
.tin-acc-checkrow .tin-acc-check span a {
    color: var(--tin-account-primary, #475141);
    text-decoration: underline;
}
.tin-acc-checkrow .tin-acc-req {
    right: 4px;
    top: 6px;
}

/* === SUBMIT BUTTON === */
.tin-acc-submit {
    display: block;
    width: 100%;
    background: var(--tin-account-button, #d4a574);
    color: #fff;
    border: 0;
    padding: 16px 22px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .15s;
    text-align: center;
    line-height: 1.3;
    border-radius: 0;
    margin: 10px 0 0;
    font-family: inherit;
    box-shadow: none;
    height: auto;
}
.tin-acc-submit:hover { filter: brightness(.92); }
.tin-acc-submit:active { filter: brightness(.88); }

/* === CHECKOUT INLINE LOGIN === */
.tin-acc-cklogin {
    max-width: 720px;
    margin: 0 auto 24px;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.tin-acc-cklogin-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    border: 0;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    transition: background .15s;
}
.tin-acc-cklogin-toggle:hover {
    background: #f3f4f6;
    color: var(--tin-account-primary, #475141);
}
.tin-acc-cklogin-toggle strong {
    color: var(--tin-account-primary, #475141);
    text-decoration: underline;
}
.tin-acc-cklogin-pill {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    background: var(--tin-account-primary, #475141);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}
.tin-acc-cklogin.is-collapsed .tin-acc-form--cklogin { display: none; }
.tin-acc-cklogin.is-open .tin-acc-form--cklogin { display: block; }
.tin-acc-form--cklogin {
    padding: 18px 20px 12px;
    border-top: 1px solid #e5e7eb;
}

/* === SOCIAL LOGIN BUTTONS === */
.tin-acc-social {
    margin: 24px 0 0;
}
.tin-acc-social-divider {
    position: relative;
    text-align: center;
    margin: 18px 0;
    color: #888;
    font-size: 13px;
}
.tin-acc-social-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: #ddd;
    z-index: 0;
}
.tin-acc-social-divider span {
    background: #fff;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}
.tin-acc-social {
    margin: 0 0 24px;
}
.tin-acc-social-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 56px;
    flex-wrap: wrap;
}
.tin-acc-social-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 8px !important;
    border: 0 !important;
    background: transparent !important;
    color: #333 !important;
    font-size: 19px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity .15s, transform .12s;
    cursor: pointer;
    line-height: 1;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.tin-acc-social-btn:hover {
    background: transparent !important;
    transform: translateY(-2px);
    opacity: .8;
    box-shadow: none !important;
}
.tin-acc-social-btn:active { transform: translateY(0); }
.tin-acc-social-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tin-acc-social-icon svg { width: 48px; height: 48px; }
.tin-acc-social-label { letter-spacing: .3px; }

/* Tablet/intermediate: riduci gap fra bottoni social */
@media (max-width: 700px) {
    .tin-acc-social-buttons { gap: 36px; }
    .tin-acc-social-btn { font-size: 16px; }
    .tin-acc-social-icon, .tin-acc-social-icon svg { width: 40px; height: 40px; }
}

/* Mobile: gap stretto, label nascosto, solo icone */
@media (max-width: 480px) {
    .tin-acc-social { margin-bottom: 18px; }
    .tin-acc-social-buttons { gap: 32px; }
    .tin-acc-social-label { display: none; }
    .tin-acc-social-icon, .tin-acc-social-icon svg { width: 44px; height: 44px; }
}

/* === HONEYPOT (hidden from humans, visible to bots) === */
.tin-acc-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* === CHECKOUT WRAPPER (pannello login al checkout sostituisce sezione Contact) === */
.tin-acc-checkout-wrap {
    margin: 0 0 30px;
}
.tin-acc-checkout-wrap .tin-acc-wrap {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Forza social buttons in fila anche se il container è stretto */
.tin-acc-checkout-wrap .tin-acc-social-buttons {
    flex-wrap: nowrap !important;
    gap: 32px !important;
    justify-content: center !important;
}
/* Riduci dimensioni icone/font social al checkout per stare in fila */
.tin-acc-checkout-wrap .tin-acc-social-icon,
.tin-acc-checkout-wrap .tin-acc-social-icon svg {
    width: 32px !important;
    height: 32px !important;
}
.tin-acc-checkout-wrap .tin-acc-social-btn { font-size: 14px !important; }
@media (max-width: 540px) {
    .tin-acc-checkout-wrap .tin-acc-social-buttons { gap: 22px !important; }
    .tin-acc-checkout-wrap .tin-acc-social-label { display: none; }
}

/* === CHECKOUT — pannello account COMPATTO (strategia A) === */
.tin-acc-ck { max-width: 100%; width: 100%; margin: 0 0 26px; box-sizing: border-box; }
/* barra allungata a tutta larghezza sopra il checkout (FC/Enfold non la espandono da soli) */
.tin-acc-ck-bar {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; box-sizing: border-box;
    gap: 18px; flex-wrap: wrap;
    background: #fff; border: 1px solid #e7e4dd; border-radius: 14px;
    box-shadow: 0 6px 24px rgba(28,30,26,.06); padding: 15px 20px;
}
.tin-acc-ck-body { width: 100%; box-sizing: border-box; }
.tin-acc-ck-q { font-size: 14.5px; color: #555; }
.tin-acc-ck-toggle {
    background: none; border: 0; padding: 0 0 1px; margin: 0 0 0 4px; cursor: pointer;
    font-family: inherit; font-size: 14.5px; font-weight: 700;
    color: var(--tin-account-primary, #475141);
    border-bottom: 1.5px solid var(--tin-account-button, #d4a574);
}
.tin-acc-ck-toggle:hover { filter: brightness(.9); }
.tin-acc-ck-hint { margin: 10px 2px 0; font-size: 13px; color: #6b7d5f; }
/* social IN CIMA al pannello: 3 pill affiancate a tutta larghezza */
.tin-acc-ck .tin-acc-social { margin: 0 0 16px !important; }
.tin-acc-ck .tin-acc-social-buttons { display: flex; flex-wrap: nowrap !important; gap: 10px !important; justify-content: center; }
.tin-acc-ck .tin-acc-social-btn {
    flex: 1 1 0; justify-content: center;
    border: 1px solid #e7e4dd !important; border-radius: 11px !important;
    padding: 11px 14px !important; font-size: 13.5px !important; gap: 8px !important;
}
.tin-acc-ck .tin-acc-social-btn:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09) !important; transform: translateY(-1px); }
.tin-acc-ck .tin-acc-social-icon,
.tin-acc-ck .tin-acc-social-icon svg { width: 20px !important; height: 20px !important; }
/* corpo login/registrazione — SEMPRE aperto (pannello non più a toggle) */
.tin-acc-ck-body {
    margin-top: 0; background: #fff; border: 1px solid #e7e4dd; border-radius: 14px;
    box-shadow: 0 6px 24px rgba(28,30,26,.06); padding: 22px 24px;
}
.tin-acc-ck-body[hidden] { display: none; }
.tin-acc-ck-body .tin-acc-wrap { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
@media (max-width: 640px) {
    /* social: 3 icone affiancate a tutta larghezza, label nascoste */
    .tin-acc-ck .tin-acc-social { margin: 0 0 14px !important; }
    .tin-acc-ck .tin-acc-social-buttons { justify-content: stretch; gap: 8px !important; flex-wrap: nowrap !important; }
    .tin-acc-ck .tin-acc-social-label { display: none; }
    .tin-acc-ck .tin-acc-social-btn { padding: 11px 0 !important; }
}

/* === CHECKOUT — avviso "login richiesto" sopra la barra del pannello ===
   Renderizzato dentro .tin-acc-ck (solo per ospiti) → sparisce da loggato. */
.tin-acc-ck-loginreq {
    margin: 0 0 14px;
    display: flex; align-items: center; gap: 9px;
    background: #f6efe4; border: 1px solid #e7d8bf;
    color: #6b4f23; border-radius: 12px;
    padding: 13px 18px; font-size: 15px; font-weight: 600;
}
.tin-acc-ck-loginreq::before { content: "🔒"; font-size: 16px; line-height: 1; }

/* === FLUID CHECKOUT — social login nello step Contact + accenti brand === */
.fc-contact-login .tin-acc-social { margin: 4px 0 0; }
.fc-contact-login .tin-acc-social-buttons {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.fc-contact-login .tin-acc-social-btn {
    border: 1px solid #e7e4dd !important; border-radius: 11px !important;
    background: #fff !important; color: #333 !important;
    padding: 9px 16px !important; font-size: 13.5px !important; font-weight: 600 !important;
    gap: 8px !important; box-shadow: none !important;
}
.fc-contact-login .tin-acc-social-btn:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.09) !important; transform: translateY(-1px);
    border-color: #d9d5cc !important; opacity: 1 !important;
}
.fc-contact-login .tin-acc-social-icon,
.fc-contact-login .tin-acc-social-icon svg { width: 20px !important; height: 20px !important; }
/* accenti brand sullo step Contact */
.fc-contact-login__action { color: var(--tin-account-primary, #475141) !important; font-weight: 600; }
.fc-contact-login__separator--social-login .fc-contact-login__separator-text,
.fc-contact-login__separator--guest .fc-contact-login__separator-text { color: #8c8f86; font-size: 12.5px; }

/* === LOST PASSWORD === */
.tin-acc-lostpw-intro {
    margin: 0 0 18px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}
.tin-acc-lostpw-back {
    margin: 14px 0 0;
    text-align: center;
    font-size: 14px;
}
.tin-acc-lostpw-back a {
    color: var(--tin-account-primary, #475141);
    text-decoration: none;
    font-weight: 500;
}
.tin-acc-lostpw-back a:hover { text-decoration: underline; }

/* === NOTICES === */
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-message {
    border-radius: 0;
    padding: 14px 18px;
    margin: 0 0 18px;
    font-size: 14px;
}

/* Email OTP login */
.tin-acc-eotp { margin: 10px 0; text-align: center; }
.tin-acc-eotp-trigger {
    background: none; border: 1px solid #475141; color: #475141;
    border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 14px; width: 100%;
}
.tin-acc-eotp-trigger:hover { background: #f3f5f2; }
.tin-acc-eotp-panel { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.tin-acc-eotp-panel input {
    width: 100%; padding: 11px; border: 1px solid #ccc; border-radius: 8px;
    background: #e8e8e8; font-size: 15px; box-sizing: border-box;
}
.tin-acc-eotp-code { letter-spacing: 4px; text-align: center; }
.tin-acc-eotp-send, .tin-acc-eotp-verify {
    width: 100%; padding: 11px; border: none; border-radius: 8px;
    background: #d4a574; color: #2b2b2b; font-weight: 700; cursor: pointer; font-size: 15px;
}
.tin-acc-eotp-send:disabled, .tin-acc-eotp-verify:disabled { opacity: .6; cursor: default; }
.tin-acc-eotp-msg { margin: 4px 0 0; font-size: 13px; color: #475141; min-height: 1em; }
