/*
Theme Name:  TataGo
Author:      Vito
Description: Piattaforma babysitter TataGo
Version:     1.0
Text Domain: tatago
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ===== VARIABILI COLORI TATAGO ===== */
:root {
  --beige:        #f5efe0;
  --beige-dark:   #e8d8b8;
  --beige-card:   #ece0cc;
  --brown:        #7a3a00;
  --brown-light:  #7a5c30;
  --green:        #3aaa35;
  --green-dark:   #2d8f29;
  --green-light:  #f0faf0;
  --blue:         #1a6fce;
  --blue-dark:    #155aaa;
  --white:        #ffffff;
  --text-dark:    #222222;
  --text-mid:     #666666;
  --text-light:   #aaaaaa;
  --border:       #e8d8b8;
  --shadow:       rgba(0,0,0,0.08);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--beige);
  color: var(--text-dark);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: 'Nunito', sans-serif; }

/* ===== LOGO FISSO IN CIMA (solo pagine autenticate) ===== */
.logo-top {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: var(--beige);
  border-bottom: 1.5px solid var(--beige-card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  /* Non intercettare tap sul contenuto */
  pointer-events: none;
}
.logo-top img {
  pointer-events: none;
}

/* ===== LAYOUT CENTRATO (mobile-first) ===== */
.page-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--beige);
  position: relative;
  display: flex;
  flex-direction: column;
  /* Spazio per logo fisso (56px) e navbar fissa (66px) */
  padding-top: 56px;
  padding-bottom: 80px;
}

/* Pagine pubbliche (login, splash, register): niente padding-top */
body:not(.is-authenticated) .page-wrapper {
  padding-top: 0;
  padding-bottom: 0;
}

/* ===== BOTTONI ===== */
.btn {
  display: block; width: 100%; padding: 17px;
  border-radius: 40px; border: none;
  font-size: 16px; font-weight: 900;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all .15s ease; text-align: center;
  touch-action: manipulation;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .9; }

.btn-green { background: var(--green); color: var(--white); box-shadow: 0 4px 16px rgba(58,170,53,0.30); }
.btn-green:hover { background: var(--green-dark); }
.btn-green:disabled { background: #b5d9b3; box-shadow: none; cursor: default; transform: none; }

.btn-blue { background: var(--blue); color: var(--white); box-shadow: 0 4px 16px rgba(26,111,206,0.28); }
.btn-blue:hover { background: var(--blue-dark); }

.btn-google {
  background: var(--white); color: var(--text-dark);
  border: 2px solid var(--border); box-shadow: none;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: 0; text-transform: none;
  font-size: 14px; font-weight: 800; border-radius: 14px; padding: 13px;
  touch-action: manipulation;
}
.btn-google:hover { background: #f5f5f0; transform: none; }
.btn-google img { width: 20px; height: 20px; }

/* ===== INPUT ===== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 10px; font-weight: 900;
  color: var(--text-light); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 5px;
}
.form-input {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--white);
  font-size: 13px; font-weight: 700; color: var(--text-dark);
  outline: none; transition: border-color .2s; appearance: none;
}
.form-input:focus  { border-color: var(--green); }
.form-input::placeholder { color: #bbb; font-weight: 600; }
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 6 5-6' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

/* ===== DIVIDER ===== */
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider-line { flex: 1; height: 1.5px; background: var(--border); }
.divider-text { font-size: 11px; font-weight: 800; color: var(--text-light); }

/* ===== CARD ===== */
.card {
  background: var(--white); border-radius: 20px;
  border: 2px solid var(--beige-card); box-shadow: 0 2px 10px var(--shadow);
  overflow: hidden; cursor: pointer; transition: transform .15s;
}
.card:hover { transform: translateY(-2px); }

/* ===== BADGE / PILL ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.pill-green  { background: var(--green-light); color: #2a8026; border: 1.5px solid var(--green); }
.pill-orange { background: #fff3e0; color: var(--brown); border: 1.5px solid #d4902a; }

/* ===== CHIP FILTRO ===== */
.chip {
  white-space: nowrap; padding: 7px 14px; border-radius: 20px;
  border: 2px solid var(--border); background: var(--white);
  font-size: 11px; font-weight: 800; color: var(--text-light);
  cursor: pointer; transition: all .15s; flex-shrink: 0;
  touch-action: manipulation;
}
.chip.active { background: var(--green); border-color: var(--green); color: var(--white); }

/* ===== TAG ===== */
.tag {
  padding: 5px 10px; border-radius: 8px; border: 2px solid var(--border);
  background: var(--white); font-size: 11px; font-weight: 800; color: #888;
  cursor: pointer; transition: all .15s;
  touch-action: manipulation;
}
.tag.active { border-color: var(--green); background: var(--green-light); color: #2a7a26; }
.tag.orange  { background: #fff3e0; color: #c07000; border-color: #f0c060; }

/* ===== LINK TESTO ===== */
.link-text { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 14px; }
.link-text a { color: var(--blue); font-weight: 800; cursor: pointer; }

/* ===== TOAST ===== */
#toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333; color: #fff;
  padding: 12px 24px; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  transition: transform .3s ease;
  z-index: 9999; white-space: nowrap; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { background: #cc3333; }
#toast.success { background: var(--green); }

/* ===== LOADER ===== */
.loader-overlay {
  position: fixed; inset: 0;
  background: rgba(245,239,224,0.85);
  display: none; align-items: center; justify-content: center; z-index: 9998;
}
.loader-overlay.show { display: flex; }
.spinner {
  width: 42px; height: 42px;
  border: 4px solid var(--border); border-top-color: var(--green);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE DESKTOP ===== */
@media (min-width: 768px) {
  body { background: #ede5d0; }
  .page-wrapper {
    margin: 30px auto; border-radius: 36px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15); min-height: auto;
  }
  .logo-top   { border-radius: 36px 36px 0 0; }
  .bottom-nav { border-radius: 0 0 36px 36px; }
}

/* ===== CHECKBOX ===== */
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.checkbox-row input[type=checkbox] { margin-top: 2px; accent-color: var(--green); width: 16px; height: 16px; }
.checkbox-row label { font-size: 12px; color: var(--text-light); line-height: 1.5; }
.checkbox-row a { color: var(--blue); font-weight: 800; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--white); border-top: 1.5px solid var(--beige-card);
  display: flex; align-items: center; justify-content: space-around;
  padding: 10px 0 16px; z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; flex: 1; text-decoration: none;
  touch-action: manipulation;
}
.nav-icon  { font-size: 22px; opacity: .75; }
.nav-icon.active  { opacity: 1; }
.nav-label { font-size: 9px; font-weight: 800; color: #888; }
.nav-label.active { color: var(--green); }

/* ===== DELETE BTN ===== */
.btn-delete {
  width: 100%; padding: 14px; border-radius: 14px;
  border: 2px solid #e0c0c0; background: #fff8f8;
  color: #cc3333; font-family: 'Nunito', sans-serif;
  font-size: 14px; font-weight: 800; cursor: pointer; transition: all .15s;
  touch-action: manipulation;
}
.btn-delete:hover { background: #ffe0e0; }

/* ===== NASCONDI FLOATING BUTTON IUBENDA ===== */
button.iubenda-tp-btn.iubenda-cs-preferences-link,
#iubenda-cs-preferences-link,
.iubenda-tp-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}