/* ─── MODAL OVERLAY ─────────────────────────────────────── */
.rb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.rb-modal.is-open {
    display: flex;
}

/* Backdrop — tamniji */
.rb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 10, 4, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

/* ─── ANIMATED ORBS — brži ──────────────────────────────── */
.rb-modal__orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.rb-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,69,41,0.65) 0%, transparent 70%);
    animation: rb-orb-float linear infinite;
}
.rb-orb--1 { width: 420px; height: 420px; top: -10%; left: -5%;   animation-duration: 8s; }
.rb-orb--2 { width: 320px; height: 320px; top: 60%;  right: -5%;  animation-duration: 6s;  animation-delay: -2s; }
.rb-orb--3 { width: 260px; height: 260px; top: 30%;  left: 40%;   animation-duration: 9s;  animation-delay: -3s; opacity: .6; }
.rb-orb--4 { width: 200px; height: 200px; bottom: 5%; left: 15%;  animation-duration: 7s;  animation-delay: -1s; opacity: .5; }
.rb-orb--5 { width: 180px; height: 180px; top: 10%;  right: 20%;  animation-duration: 10s; animation-delay: -4s; opacity: .45; }

@keyframes rb-orb-float {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(35px, -25px) scale(1.06); }
    50%  { transform: translate(-25px, 35px) scale(.94); }
    75%  { transform: translate(25px, 25px) scale(1.03); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ─── DIALOG ─────────────────────────────────────────────── */
.rb-modal__dialog {
    position: relative;
    z-index: 1;
    background: rgb(4 21 8 / 50%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsla(29, 16%, 72%, .2);
    border-radius: 20px;
    width: 100%;
    max-width: 620px;
    max-height: 90dvh;
    overflow: hidden;
    margin: 16px;
    display: flex;
    flex-direction: column;
}

.rb-modal__step {
    overflow-y: auto;
    padding: clamp(28px, 4vw, 52px);
    scrollbar-width: thin;
    scrollbar-color: rgba(195,183,172,.3) transparent;
}

/* ─── CLOSE — vidljivije ─────────────────────────────────── */
.rb-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(195,183,172,.15);
    border: 1px solid rgba(195,183,172,.35);
    color: #fbf5ef;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    flex-shrink: 0;
    z-index: 2;
}
.rb-modal__close:hover {
    background: rgba(195,183,172,.3);
    border-color: rgba(195,183,172,.6);
}
.rb-modal__close svg { width: 16px; height: 16px; }

/* ─── HEADER ─────────────────────────────────────────────── */
.rb-modal__header {
    text-align: center;
    margin-bottom: 28px;
    padding-right: 32px;
}
.rb-modal__eyebrow {
    display: inline-block;
    font-size: clamp(0.625rem, .8vw, .75rem);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #c8b89a;
    margin-bottom: 10px;
}
.rb-modal__title {
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    font-weight: 300;
    color: #fbf5ef;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    line-height: 1.15;
}
.rb-modal__sub {
    font-size: .875rem;
    color: rgba(195,183,172,.7);
    margin: 0;
}

/* ─── FORM ───────────────────────────────────────────────── */
.rb-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.rb-form__row--spaced {
    margin-bottom: 25px;
}
.rb-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.rb-form__field--spaced {
    margin-bottom: 25px;
}
.rb-slots-date-label {
    display: block;
    font-size: .9375rem !important;
    font-weight: 500 !important;
    color: #c8b89a !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    margin-bottom: 12px;
    padding-top: 4px;
}
.rb-form__label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(195,183,172,.8);
}
.rb-form__input {
    background: rgb(4 21 8 / 30%);
    border: 1px solid hsla(29, 16%, 72%, .2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fbf5ef;
    font-size: .9375rem;
    outline: none;
    transition: border-color .2s, background .2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.rb-form__input::placeholder { color: rgba(195,183,172,.4); }
.rb-form__input:focus { border-color: rgba(200,184,154,.5); background: rgb(0 69 41 / 20%); }
.rb-form__input.is-filled {
    border-color: rgba(200,184,154,.7);
    background: rgb(0 69 41 / 30%);
}

/* ─── SERVICE OPTIONS ─────────────────────────────────────── */
.rb-service-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.rb-service-option { cursor: pointer; display: block; }
.rb-service-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.rb-service-card {
    background: rgb(4 21 8 / 30%);
    border: 1px solid hsla(29,16%,72%,.2);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}
.rb-service-radio:checked + .rb-service-card {
    border-color: rgba(200,184,154,.7);
    background: rgb(0 69 41 / 35%);
}
.rb-service-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.rb-service-card__name { font-size: .875rem; font-weight: 600; color: #fbf5ef; }
.rb-service-card__duration {
    font-size: .75rem; font-weight: 600; color: #c8b89a;
    background: rgba(200,184,154,.15); border-radius: 20px; padding: 2px 8px;
}
.rb-service-card__desc {
    font-size: .75rem; color: rgba(195,183,172,.65); margin: 0; line-height: 1.4;
}

/* ─── CALENDAR SECTION ───────────────────────────────────── */
.rb-cal-section {
    border-top: 1px solid hsla(29,16%,72%,.15);
    padding-top: 16px;
    margin-top: 4px;
}
.rb-cal-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(195,183,172,.7);
    font-size: .875rem;
    padding: 16px 0;
}

/* Week navigation */
.rb-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    background: rgb(4 21 8 / 30%);
    border: 1px solid hsla(29,16%,72%,.2);
    border-radius: 12px;
    padding: 10px 14px;
}
.rb-cal-nav__btn {
    background: none;
    border: 1px solid hsla(29,16%,72%,.25);
    border-radius: 6px;
    color: rgba(195,183,172,.8);
    font-size: .6875rem;
    font-family: inherit;
    padding: 5px 8px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.rb-cal-nav__btn:hover:not(:disabled) {
    border-color: rgba(200,184,154,.5);
    color: #c8b89a;
}
.rb-cal-nav__label {
    font-size: .8125rem;
    font-weight: 600;
    color: #c8b89a;
    text-align: center;
    line-height: 1.3;
}

/* Day blocks */
.rb-cal-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}
.rb-cal-day {
    background: rgb(4 21 8 / 25%);
    border: 1px solid hsla(29,16%,72%,.15);
    border-radius: 12px;
    overflow: hidden;
}
.rb-cal-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid hsla(29,16%,72%,.12);
    background: #faebd721;
}
.rb-cal-day__name {
    font-size: .8125rem;
    font-weight: 700;
    color: #c8b89a;
    letter-spacing: .06em;
}
.rb-cal-day__date {
    font-size: .8125rem;
    color: rgba(195,183,172,.55);
}
.rb-cal-day__slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;

    @media (min-width: 400px) {
        grid-template-columns: repeat(4, 1fr);
    }
}
.rb-cal-slot {
    background: rgb(4 21 8 / 40%);
    border: 1px solid hsla(29,16%,72%,.2);
    border-radius: 8px;
    padding: 10px 8px;
    font-size: .8125rem;
    font-weight: 600;
    color: #fbf5ef;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: border-color .2s, background .2s, color .2s;
}
.rb-cal-slot:hover {
    border-color: hsla(29,16%,72%,.5);
    background: rgb(0 69 41 / 30%);
}
.rb-cal-slot.is-selected {
    border-color: #c8b89a;
    background: rgb(0 69 41 / 50%);
    color: #c8b89a;
}

.rb-dates-empty {
    font-size: .875rem;
    color: rgba(195,183,172,.6);
    padding: 16px 0;
    text-align: center;
}

/* ─── FORM ERROR ─────────────────────────────────────────── */
.rb-form-error {
    background: rgba(165,0,20,.2);
    border: 1px solid rgba(165,0,20,.4);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .875rem;
    color: #ffb3b3;
    margin-bottom: 16px;
}

/* ─── SUBMIT ─────────────────────────────────────────────── */
.rb-submit-btn {
    width: 100%; height: 56px;
    border-radius: 28px;
    border: 2px solid #fbf5ef;
    background: transparent;
    color: #fbf5ef;
    font-size: .9375rem; font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .25s, color .25s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 8px;
}
.rb-submit-btn:hover:not(:disabled) { background: #fbf5ef; color: #004529; }
.rb-submit-btn:disabled { opacity: .45; cursor: not-allowed; }
.rb-btn-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: rb-spin .7s linear infinite;
}

/* ─── SUCCESS ─────────────────────────────────────────────── */
.rb-success { text-align: center; padding: 20px 0; }
.rb-success__icon {
    width: 72px; height: 72px; border-radius: 50%;
    border: 2px solid rgba(200,184,154,.4); color: #c8b89a;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    animation: rb-pop .4s ease;
}
.rb-success__icon svg { width: 36px; height: 36px; }
@keyframes rb-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rb-success__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 300; color: #fbf5ef; letter-spacing: -.02em; margin: 0 0 12px;
}
.rb-success__msg { font-size: .9375rem; color: rgba(195,183,172,.8); margin: 0 0 24px; line-height: 1.6; }
.rb-success__details {
    background: rgb(0 69 41 / 30%);
    border: 1px solid hsla(29,16%,72%,.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    text-align: left;
}
.rb-success__row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
}
.rb-success__label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(195,183,172,.5);
    flex-shrink: 0;
    width: 64px;
}
.rb-success__val {
    font-size: 1rem;
    color: #fbf5ef;
    font-weight: 500;
    line-height: 1.4;
}
.rb-success__divider {
    height: 1px;
    background: hsla(29,16%,72%,.15);
    margin: 2px 0;
    border: none;
}
.rb-success__title {
    font-size: 1.75rem;
    font-weight: 300;
    color: #fbf5ef;
    margin: 16px 0 12px;
    letter-spacing: -.01em;
}
.rb-success__msg {
    font-size: 1rem;
    color: rgba(195,183,172,.75);
    line-height: 1.6;
    margin-bottom: 24px;
}
.rb-modal__close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    min-width: 200px;
    border-radius: 26px;
    border: 2px solid #fbf5ef;
    background: transparent;
    color: #fbf5ef;
    font-size: .9375rem;
    font-family: inherit;
    cursor: pointer;
    transition: background .25s, color .25s;
    position: static;
    width: auto;
}
.rb-modal__close-btn:hover { background: #fbf5ef; color: #004529; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 520px) {
    .rb-form__row       { grid-template-columns: 1fr; }
    .rb-service-options { grid-template-columns: 1fr; }
    .rb-modal__dialog   { border-radius: 16px; max-height: 92dvh; margin: 12px; }
    .rb-modal           { align-items: center; padding: 0; }
}