/* ---------------------------------------
   Ski booking form (MVP)
   --------------------------------------- */

.ski-booking-root {
  --accent: #c4f771;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);

  background: transparent;
  position: relative;
}

/*
.ski-step {
    padding: 14px 0 90px;
}
*/
.ski-step {
    padding-bottom: 80px;
}
@media (min-width: 768px) {
    .ski-step {
        padding-bottom: 80px;
    }
}



/* ---------------------------------------
   Cards / sections
   --------------------------------------- */

.ski-card {
    border: 1px solid var(--bs-primary-surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.ski-card__header {
    border-bottom: 1px solid var(--bs-primary-surface-light);
}

.ski-section {
    border-bottom: 1px solid var(--bs-primary-surface-light);
}

.ski-section:last-child {
    border-bottom: 0;
}

/* ---------------------------------------
   Grid / fields
   --------------------------------------- */

.ski-grid {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .ski-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ski-grid > [data-grid-span="full"] {
        grid-column: 1 / -1;
    }
}


.ski-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ski-field label {
    font-weight: 500;
    color: var(--bs-primary);
}
.ski-field label.ski-radio {
    font-weight: 400;
    color: var(--bs-black);
    font-size: 14px;
    margin: 0;
}


.ski-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12' fill='none'><path d='M10.0001 11.3121C9.8376 11.3121 9.68135 11.2496 9.55635 11.1309L0.181348 1.75586C-0.0624023 1.51211 -0.0624023 1.11836 0.181348 0.87461C0.425098 0.63086 0.818848 0.63086 1.0626 0.87461L10.0001 9.80586L18.9313 0.868359C19.1751 0.624609 19.5688 0.624609 19.8126 0.868359C20.0563 1.11211 20.0563 1.50586 19.8126 1.74961L10.4376 11.1246C10.3188 11.2496 10.1626 11.3121 10.0001 11.3121Z' fill='%231A1A1A'/></svg>");

    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;

    padding-right: 36px;
}




/* Radio / checkbox */
.ski-radio,
.ski-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 0 16px 10px 0;
}

.ski-radio input,
.ski-checkbox input {
    transform: scale(1.05);
}

.ski-radio:hover,
.ski-checkbox:hover {
    border-color: rgba(127,223,245,0.35);
}

/* Make the radio group wrap nicely */
[data-field="age_group"],
[data-field="rent_type"] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------------------------------------
   Collapsible (ski school)
   --------------------------------------- */

.ski-collapse-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
}


.ski-collapse-toggle__chev {
    opacity: 0.7;
    transition: transform 160ms ease;
}

.ski-collapse-toggle.is-open .ski-collapse-toggle__chev {
    transform: rotate(180deg);
}

.ski-collapse {
    border-top: 1px solid var(--bs-primary-surface-light);
}

/* ---------------------------------------
   Actions / buttons
   --------------------------------------- */

.ski-actions {
    display: flex;
    gap: 10px;
    margin: 14px 0 0;
}

/*
.ski-btn {
    border: 1px solid var(--bs-primary-surface-light2);
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 90ms ease, border-color 120ms ease, background 120ms ease;
}

.ski-btn:hover {
    border-color: rgba(127,223,245,0.45);
    background: rgba(255,255,255,0.06);
}

.ski-btn:active {
    transform: translateY(1px);
}

.ski-btn--primary {
    border-color: rgba(196, 247, 113, 0.55);
    background: rgba(196, 247, 113, 0.16);
}

.ski-btn--primary:hover {
    border-color: rgba(196, 247, 113, 0.8);
    background: rgba(196, 247, 113, 0.20);
}
*/

.ski-btn--small {
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 700;
}

/* ---------------------------------------
   Summary rows (participant recap + edit)
   --------------------------------------- */

.ski-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--bs-primary-surface-light);
}

.ski-summary-row:first-of-type {
  border-top: 0;
}

/*
.ski-summary-meta {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
}
*/


/* ---------------------------------------
   Errors
   --------------------------------------- */

.is-error {
  border-color: rgba(255,107,107,0.8) !important;
  box-shadow: 0 0 0 4px rgba(255,107,107,0.16) !important;
}

.ski-error {
  margin-top: 6px;
  color: rgba(255,107,107,0.95);
  font-size: 12px;
  line-height: 1.25;
}

/* ---------------------------------------
   Submit message
   --------------------------------------- */

.ski-submit-msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--bs-primary-surface-light);
  background: rgba(255,255,255,0.04);
}

.ski-submit-msg.is-error {
  border-color: rgba(255,107,107,0.65);
  background: rgba(255,107,107,0.10);
}

.ski-submit-msg.is-ok {
  border-color: rgba(196,247,113,0.55);
  background: rgba(196,247,113,0.12);
}

/* ---------------------------------------
   Sticky bottom bar
   --------------------------------------- */

.ski-sticky {
   
    position: sticky;
    bottom: 0;
    z-index: 999;

    /* break out of parent width */
    width: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    /* optional */
    border-radius: 0;

    background: var(--bs-primary-surface-light);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    /*display: grid;*/
    grid-template-columns: 1fr 1fr 1fr;
    overflow: hidden;


}
.ski-sticky.is-hidden {
  display: none !important;
}

.ski-sticky > .container{
  /* Bootstrap already has margin-left/right: auto,
     but we ensure it and prevent weird inherited constraints */
  margin-left: auto;
  margin-right: auto;

  /* optional: if your theme adds text-align or flex to parents */
  text-align: initial;
}
.ski-booking-root .ski-sticky {
    display: block;
}


.ski-sticky__label {
  font-size: 12px;
  margin-bottom: 6px;
}

.ski-sticky__value {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* On very small screens allow wrap */
@media (max-width: 420px) {
  .ski-sticky {
    grid-template-columns: 1fr;
  }
  .ski-sticky__item {
    border-right: 0;
    border-top: 1px solid var(--bs-primary-surface-light);
  }
  .ski-sticky__item:first-child {
    border-top: 0;
  }
}

/* ---------------------------------------
   Terms (checkbox row)
   --------------------------------------- */

.ski-terms a {
  color: var(--bs-primary);
  text-decoration: underline;
}

/* ---------------------------------------
   Modal
   --------------------------------------- */

.ski-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.ski-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tos-modal__panel {
    position: relative;
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

body.tos-modal-open {
    overflow: hidden;
}

.ski-modal__panel {
    position: relative;
    max-width: 520px;
    width: calc(100% - 32px);
    margin: 0;
    background-color: #fff;
    border-radius: 4px;
    
}

.ski-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    cursor: pointer;
}

.ski-modal__close:hover {
    border-color: rgba(127,223,245,0.45);
}

.ski-modal__content {
    padding: 18px 16px;
    overflow: auto;
}

.ski-modal__content h1,
.ski-modal__content h2,
.ski-modal__content h3 {
    margin: 0 0 10px;
}

.ski-modal__content p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.ski-modal__content ul {
    margin: 0 0 12px 18px;
}

/* ---------------------------------------
   Small polish
   --------------------------------------- */

.ski-card,
.ski-sticky,
.ski-btn,
.ski-radio,
.ski-checkbox,
.ski-field input,
.ski-field select {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------
   Overlay
   --------------------------------------- */
.ski-loading-overlay {
    position: absolute;
    width: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(2px);
    z-index: 9;
}

.ski-loading-overlay.is-visible {
  display: flex;
}

.ski-loading-overlay__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 12px;
    background: #54301A;
    border: 1px solid #54301A;
}

.ski-loading-overlay__text {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
}

.ski-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: ski-spin 0.85s linear infinite;
}

@keyframes ski-spin {
  to { transform: rotate(360deg); }
}

/* Optional: make disabled buttons look clearly disabled */
.ski-step button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
