:root{
  --vh: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font-sans: Arial, sans-serif;
  
  --axa-bg-primary:#F7F7F8;
  --axa-bg-secondary:#F2F4F6;

  --axa-dark-blue:#070E40;
  --axa-blue:#00008F;
  --axa-medium-blue:#4658FC;
  --axa-red:#FF1721;
  --axa-light-blue:#E2EFFF;

  --axa-text-primary:#131519;
  --axa-text-secondary:#4A505A;
  --axa-text-error:#E3000A;

  --axa-information-dark:#152E54;
  --axa-information-base:#234476;
  --axa-information-light:#8AB7FF;

  --axa-success-dark:#0F4527;
  --axa-success-base:#17663A;
  --axa-error-dark:#880727;
  --axa-error-base:#D50B3E;

  --color-bg: var(--axa-bg-secondary);
  --color-surface: #ffffff;
  --color-card: var(--axa-bg-secondary);
  --color-border: #e5e7eb;
  --color-border-strong: #7e7f7f;
  --color-text: var(--axa-text-primary);
  --color-text-muted: var(--axa-text-secondary);
  --color-text-muted-2: var(--axa-text-secondary);
  --color-text-soft: var(--axa-text-secondary);
  --color-text-subtle: var(--axa-text-secondary);
  --color-brand: var(--axa-blue);
  --color-accent: var(--axa-medium-blue);
  --color-link: var(--axa-blue);
  --color-danger: var(--axa-red);
  --color-disabled: #aaa;

  --grad-start: var(--axa-blue);
  --grad-end: var(--axa-medium-blue);
  --nav-grad-start: var(--axa-information-light);
  --nav-grad-end: var(--axa-medium-blue);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-calendar: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-popup: 0 6px 16px rgba(0, 0, 0, 0.2);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 14px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 30px;

  --input-max: 420px;
  --input-width: min(90%, var(--input-max));
  --button-max: 379px;

  --info-top: -8%;
  --info-right: 1%;
  --info-right-sm: -2%;
  --bubble-gap: 10px;
  --bubble-gap-sm: 8px;

  --z-calendar-wrapper: 2000;
  --z-calendar: 2001;
  --z-info: 1002;
  --z-bubble: 100000;
  --z-overlay: 200000;
  --z-popup: 200001;
}

@supports not (height: 100dvh){
  :root{ --vh: 100vh; }
}

html{
  height: 100%;
  overflow: hidden;
}

html, body{
  height: 100%;
  min-height: var(--vh);
  box-sizing: border-box;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
}

body{
  height: var(--vh);
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

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

.hidden{ display: none; }

.card-list{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-7);
  max-width: 800px;
  margin: 0 auto;
  padding-top: 3%;
  width: 95%;
}

.appointments-page{
  --appointments-title-height: clamp(48px, 8vh, 72px);
  --appointments-title-offset: calc(var(--appointments-title-height) + var(--safe-top));
  min-height: var(--vh);
  margin: 0;
}

.appointments-page .appointments-center{
  position: fixed;
  top: var(--appointments-title-offset);
  left: 0;
  right: 0;
  bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
}

.appointments-page .title{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--appointments-title-offset);
  padding-top: var(--safe-top);
  z-index: 10;
  margin: 0;
  background-color: var(--color-bg);
  transform: none;
}

.appointments-page .card-list{
  padding-top: 0;
}

.card{
  display: block;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  width: 95%;
  max-width: 600px;
  height: auto;
}

.card:hover{
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-content{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-text{
  color: var(--color-text-muted);
  flex: 1;
}

.card h3{
  margin: 0 0 var(--space-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.card p{
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted-2);
}

.cancel-wrapper{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-bg);
  margin-top: clamp(40px, 10vh, 200px);
  gap: var(--space-4);
}

.ccard{
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: inherit;
  box-shadow: var(--shadow-sm);
  width: 95%;
  max-width: 600px;
  height: auto;
  justify-content: center;
  align-items: center;
  margin-bottom: 210px;
}

.ccard-content{
  text-align: center;
}

.ccard p{
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted-2);
}

.card-arrow{
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.card:hover .card-arrow{
  transform: translateX(4px);
}

.info-wrapper{
  height: var(--vh);
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-content{
  text-align: center;
  justify-content: center;
  align-items: center;
  margin-bottom: 200px;
}

.info-content p{
  margin: var(--space-2) 0;
  font-size: 15px;
  font-weight: normal;
  color: var(--color-text-soft);
  text-align: center;
}

.cocuk .cocuk-text{
  margin: var(--space-2) 0;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-soft);
}

.cocuk-text .telno{
  color: var(--color-link);
  text-decoration: none;
  margin: 0 var(--space-1);
}

.cocuk-text .telno:hover{
  text-decoration: underline;
}

:is(select, .date-picker-display, .custom-input, input.custom-input){
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--color-surface);
  font-size: 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 10px;
  width: var(--input-width);
  box-sizing: border-box;
  text-align: left;
  text-indent: 2px;
  color: var(--color-text-muted);
}

:is(select, .date-picker-display, .custom-input, input.custom-input):focus{
  outline: none;
  border: 2px solid var(--axa-dark-blue);
}

select,
.date-picker-display{
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 32px 32px;
}

.date-picker-display{
  cursor: pointer;
  display: block;
  position: relative;
}

.custom-select-wrapper, .custom-radio,
.custom-select{
  width: var(--input-width);
}

.custom-select-wrapper{
  position: relative;
}

.calendar-wrapper{
  position: relative;
  display: inline-block;
  width: min(100%, var(--input-max));
  z-index: var(--z-calendar-wrapper);
}

.calendar{
  position: absolute;
  width: 300px;
  background-color: var(--color-surface);
  border: 1px solid #aaa9a9;
  border-radius: 10px;
  box-shadow: var(--shadow-calendar);
  padding: var(--space-3);
  z-index: var(--z-calendar);
  align-items: center;
}

.calendar.hidden{
  display: none;
}

.month-year-with-nav{
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 12px;
}

#monthYear{
  width: 120px;
  text-align: left;
  white-space: nowrap;
  color: var(--color-text-muted);
} 

.nav-buttons-inline button{
  border: none;
  background: none;
  padding: 0;
  margin-right: 175px;
}

.calendar-days{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  font-size: 10px;
  border-bottom: 2px solid var(--axa-text-secondary);
  padding-bottom: 6px;
  color: var(--color-text-muted);
}

.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
}

.calendar-grid div{
  padding: 6px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.calendar-grid div:hover{
  background-color: #eee;
}

.calendar-grid .inactive{
  color: #bbb;
}

.calendar-grid .selected{
  background-color: var(--axa-light-blue);
  color: var(--axa-text-primary);
}

.gradient-button,
.update-button,
.cancel-button,
.onay-button{
  background: linear-gradient(to right, var(--grad-start), var(--grad-end));
  color: #fff;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.3s ease;
  width: 90%;
  max-width: var(--button-max);
  display: block;
  position: relative;
  z-index: 150;
  transform: none;
  margin-top: var(--space-4);
  margin-bottom: 15px;
}

.gradient-button:hover,
.update-button:hover,
.cancel-button:hover,
.onay-button:hover{
  opacity: 0.9;
}

label{
  margin-left: 0;
  text-align: left;
  width: var(--input-width);
  font-weight: bold;
  font-size: 12px;
  display: flex;
  justify-content: flex-start;
  color: var(--color-text-muted);
}

.custom-radio{
  display: flex;
  align-items: center;
  gap: 16px;
  width: var(--input-width);
  flex-wrap: wrap;
  flex-direction: row;
  transform: translateX(5%);
}

.custom-radio .radio-item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
  font-size: 12px;
  color: var(--color-text-subtle);
}

.custom-radio input[type="radio"]{
  margin: 0;
}

#childFields{
  width: var(--input-width);
  margin: 0;
  box-sizing: border-box;
  flex-direction: column;
}

#childFields:not(.hidden){
  display: flex;
}

#childFields label{
  width: 100%;
  box-sizing: border-box;
}

#childFields .custom-select-wrapper{
  width: 100%;
  margin-left: 0;
}

.form-wrapper{
  height: var(--vh);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

form{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}
.form-input{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-4);
 }

.check-icon{
  width: 24px;
  height: 24px;
}

.tick-path{
  display: none;
}

.title{
  font-weight: bold;
  color: var(--axa-blue);
  display: flex;
  align-items: center;
  gap: clamp(16px, 6vw, 48px);
  margin-top: clamp(8px, 2vh, 24px);
  margin-bottom: clamp(16px, 5vh, 40px);
  transform: translateY(100%);
  justify-content: center;
}

.title-text{
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.title-link{
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.user-info{
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text-subtle);
  transform: translateY(5px);
}

.request-items{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: clamp(40px, 12vh, 250px);
  gap: var(--space-4);
}

.req-text{
  position: absolute;
  margin-top: clamp(40px, 12vh, 250px);
  left: 19px;
  align-items: center;
}

.title,
label,
.user-info,
.alt-text{
  overflow-wrap: anywhere;
}

.custom-select-wrapper,
#tarih.date-field{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-container{
  position: absolute;
  top: var(--info-top);
  right: var(--info-right);
  left: auto;
  transform: translateY(-50%);
  z-index: var(--z-info);
  pointer-events: auto;
}

.info-icon{
  font-size: 12px;
  width: 16px;
  height: 16px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--color-danger);
  background-color: var(--color-surface);
  color: var(--color-danger);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.red-text{
  font-size: 14px;
  color: var(--axa-text-error);
}

.bubble{
  display: none;
  position: absolute;
  padding: var(--space-3);
  background-color: var(--color-surface);
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup);
  width: 280px;
  z-index: var(--z-bubble);
  max-height: 80vh;
  overflow-y: auto;
}

.info-container .bubble{
  top: 50%;
  right: calc(100% + var(--bubble-gap));
  left: auto;
  transform: translateY(-50%);
  max-width: min(280px, 92vw);
}

.bubble p{
  margin: 5px 0;
  font-size: 12px;
  text-align: center;
}

.overlay{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--vh);
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: var(--z-overlay);
}

.overlay.show{ display: flex; }

.popup{
  background: var(--color-surface);
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  width: 325px;
  max-width: 90vw;
  padding: var(--space-4);
  box-shadow: var(--shadow-popup);
  z-index: var(--z-popup);
  text-align: center;
}

.popup p{
  margin: 30px 0;
  line-height: 1.6;
  font-size: 12px;
}

.popup-title{
  font-size: 14px;
  font-weight: 700;
  color: var(--axa-blue);
  margin-bottom: var(--space-2);
}

.popup .popup-message{
  margin: var(--space-4) 0;
  line-height: 1.6;
  font-size: 12px;
  white-space: pre-line;
}

.popup-ok{
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-2) 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(to right, var(--grad-start), var(--grad-end));
}

.popup-ok:active{ opacity: 0.9; }

.alt-text{
  color: var(--axa-text-secondary);
  font-weight: 400;
  font-size: 10px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  margin-bottom: 5px;
}

.cocuk-alt-text{
  color: var(--color-text-soft);
  font-weight: 600;
  font-size: 10px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  /* line-height: 1.5; */
  margin-top: 0px;
}

.nav-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  color: var(--axa-text-secondary);
  text-decoration: none;
  width: 20%;
}

.nav-item img{
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-1);
  filter: grayscale(100%) brightness(0%);
}

.nav-item span{
  font-weight: normal;
  background: linear-gradient(90deg, var(--nav-grad-start), var(--nav-grad-end));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

select option:disabled{ color: var(--color-disabled); }

@media (max-width: 768px){
  select,
  .date-picker-display,
  .custom-select-wrapper,
  .custom-radio,
  .custom-select,
  .custom-input{
    margin-left: 0 !important;
  }

  .gradient-button,
  .update-button,
  .cancel-button,
  .onay-button{
    max-width: 90%;
  }

  .popup{
    left: 10px;
    width: 90%;
  }
}

@media (max-width: 480px){
  select,
  .date-picker-display,
  .custom-select-wrapper,
  .custom-radio,
  .custom-select,
  .custom-input{
    width: 95% !important;
  }

  .gradient-button,
  .update-button,
  .cancel-button,
  .onay-button{
    max-width: 90% !important;
  }

  .info-container{
    right: var(--info-right-sm);
  }

  .info-container .bubble{
    right: calc(100% + var(--bubble-gap-sm));
  }

  .alt-text{
    font-size: 9px;
    padding: 0 12px;
  }

  .cocuk-alt-text{
    font-size: 9px;
    padding: 0 12px;
}
}

body.success-page{
  margin: 0;
  padding: 0;
}

body.success-page .info-wrapper{
  min-height: var(--vh);
  height: auto;
  padding: clamp(24px, 6vh, 72px) 16px;
  box-sizing: border-box;
}

body.success-page .info-content{
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 520px;
}

body.success-page .info-content p,
body.success-page .info-content .cocuk-text{
  margin: 0;
}

body.success-page .info-content br{
  display: none;
}

.custom-radio .radio-item{
  font-weight: 400;
}

/* Birth date calendar - match main calendar layout */
#birthDateField.date-field{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#birthMonthYear{
  width: 120px;
  text-align: left;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.calendar-fast-select{
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0px solid var(--color-border-strong);
}

#birthMonthSelect{
  border: 0px solid var(--color-border-strong);  
}

#birthYearSelect{
  border: 0px solid var(--color-border-strong);  
}

.calendar-select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-size: 12px;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--color-text-muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  background-image: none;
  box-shadow: none;
}

.calendar-select:hover,
.calendar-select:focus{
  color: var(--color-text);
  background-color: #f0eff6;
  border-radius: 6px;
  padding: 2px 6px;
}

.calendar-select:focus{
  outline: none;
  border: none;
}
