
/* =========================================================
   DotsFlow Demo Booking v1.3
   Calendly-inspired layout, DotsFlow visual system
   ========================================================= */

.dfb-overlay,
.dfb-overlay * {
    box-sizing: border-box;
}

.dfb-overlay {
    --df-purple: #5F1EF1;
    --df-purple-dark: #4B16C4;
    --df-ink: #0A1533;
    --df-text: #4E5B73;
    --df-muted: #7D879A;
    --df-border: #DDE3EC;
    --df-soft: #F7F9FC;
    --df-soft-purple: #F3EFFF;
    --df-blue: #006BFF;

    position: fixed;
    inset: 0;
    z-index: 999999;

    display: grid;
    place-items: center;

    padding: 24px;

    background: rgba(16, 24, 40, 0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .24s ease, visibility .24s ease;

    font-family: "proxima-nova", "Proxima Nova", Arial, sans-serif !important;
}

.dfb-overlay * {
    font-family: "proxima-nova", "Proxima Nova", Arial, sans-serif !important;
}

.dfb-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.dfb-lock {
    overflow: hidden !important;
}

.dfb-modal {
    position: relative;

    width: min(820px, calc(100vw - 72px));
    min-height: 0;
    height: min(520px, calc(100vh - 72px));
    max-height: calc(100vh - 72px);

    display: grid;
    grid-template-columns: 34% 66%;

    overflow: hidden;

    background: #fff;

    border: 1px solid #D5DEE9;
    border-radius: 12px;

    box-shadow:
        0 26px 80px rgba(22, 35, 64, .18),
        0 4px 14px rgba(22, 35, 64, .07);

    transform: translateY(16px) scale(.99);
    opacity: 0;

    transition:
        transform .28s cubic-bezier(.2, .8, .2, 1),
        opacity .22s ease;
}

.dfb-overlay.is-open .dfb-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.dfb-close {
    position: absolute;
    z-index: 20;

    top: 16px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid var(--df-border);
    border-radius: 8px;

    background: #fff;
    color: var(--df-ink);

    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    transition: background .18s ease, border-color .18s ease;
}

.dfb-close:hover {
    background: #F7F9FC;
    border-color: #C8D1DE;
}


/* =========================================================
   LEFT PANEL
   ========================================================= */

.dfb-sidebar {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 28px 24px 22px;

    border-right: 1px solid var(--df-border);

    background: #fff;
}

.dfb-organizer {
    margin-bottom: 8px;

    color: #234D86;

    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.dfb-sidebar h2 {
    margin: 0;

    color: var(--df-ink);

    font-size: 23px;
    line-height: 1.1;
    letter-spacing: -.45px;
    font-weight: 700;
}

.dfb-meeting-meta {
    margin-top: 22px;
}

.dfb-meta-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 9px;
    align-items: start;

    margin-bottom: 18px;

    color: #31567F;

    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}

.dfb-meta-row svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: #164C80;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dfb-sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;

    padding-top: 30px;
}

.dfb-sidebar-links a {
    color: #005AD8 !important;

    font-size: 12px;
    line-height: 1;
    font-weight: 600;

    text-decoration: none !important;
}

.dfb-sidebar-links a:hover {
    text-decoration: underline !important;
}


/* =========================================================
   RIGHT PANEL
   ========================================================= */

.dfb-main {
    position: relative;
    min-width: 0;

    background: #fff;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dfb-main::-webkit-scrollbar {
    width: 7px;
}

.dfb-main::-webkit-scrollbar-thumb {
    background: #D9DFE8;
    border-radius: 10px;
}

.dfb-step {
    display: none;
    min-height: 100%;
    height: auto;

    animation: dfbFade .2s ease both;
}

.dfb-step.is-active {
    display: block;
}

@keyframes dfbFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dfb-main-title {
    padding: 24px 28px 8px;
}

.dfb-main-title h3,
.dfb-details-head h3,
.dfb-success h3 {
    margin: 0;

    color: var(--df-ink);

    font-size: 25px;
    line-height: 1.15;
    letter-spacing: -.4px;
    font-weight: 700;
}

.dfb-alert {
    position: relative;

    margin: 16px 34px 0;
    padding: 11px 13px;

    border: 1px solid #F0CDCD;
    border-radius: 7px;

    background: #FFF7F7;
    color: #A13E3E;

    font-size: 12px;
    line-height: 1.45;
}


/* =========================================================
   CALENDAR + TIMES
   ========================================================= */

.dfb-schedule-stage {
    min-height: 420px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 0fr;

    transition: grid-template-columns .28s cubic-bezier(.2,.8,.2,1);
}

.dfb-schedule-stage.has-date {
    grid-template-columns: minmax(0, 1fr) 205px;
}

.dfb-calendar-column {
    min-width: 0;

    padding: 10px 26px 18px;
}

.dfb-calendar-head {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;

    margin-bottom: 16px;
}

.dfb-calendar-head strong {
    text-align: center;

    color: var(--df-ink);

    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
}

.dfb-month-nav {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #0B62C2;

    cursor: pointer;

    transition: background .18s ease;
}

.dfb-month-nav:hover:not(:disabled) {
    background: #F0F6FF;
}

.dfb-month-nav:disabled {
    color: #CAD1DC;
    cursor: default;
}

.dfb-month-nav svg,
.dfb-back svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dfb-weekdays,
.dfb-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.dfb-weekdays {
    margin-bottom: 5px;
}

.dfb-weekdays span {
    text-align: center;

    color: #375179;

    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

.dfb-days {
    row-gap: 6px;
}

.dfb-day {
    justify-self: center;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #F2F7FD;
    color: #005AD8;

    font: inherit;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .16s ease,
        color .16s ease,
        transform .16s ease,
        box-shadow .16s ease;
}

.dfb-day:hover:not(:disabled) {
    background: #E6F1FF;
    transform: translateY(-1px);
}

.dfb-day.is-today {
    position: relative;
}

.dfb-day.is-today::after {
    content: "";

    position: absolute;
    bottom: 4px;
    left: 50%;

    width: 3px;
    height: 3px;

    transform: translateX(-50%);

    border-radius: 50%;
    background: #006BFF;
}

.dfb-day.is-selected {
    background: var(--df-purple);
    color: #fff;

    box-shadow: 0 5px 14px rgba(95,30,241,.20);
}

.dfb-day.is-selected::after {
    background: #fff;
}

.dfb-day:disabled {
    background: transparent;
    color: #C4CAD4;

    cursor: default;
}

.dfb-day.is-blank {
    visibility: hidden;
}

.dfb-timezone {
    margin-top: 27px;
}

.dfb-timezone-title {
    display: block;

    margin-bottom: 9px;

    color: var(--df-ink);

    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.dfb-timezone-value {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #234D86;
}

.dfb-timezone-value svg {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dfb-timezone-label {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.dfb-times-column {
    min-width: 0;
    overflow: hidden;

    padding: 15px 0 24px;

    border-left: 1px solid transparent;

    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;

    transition:
        opacity .2s ease .04s,
        transform .25s ease,
        border-color .25s ease;
}

.dfb-schedule-stage.has-date .dfb-times-column {
    padding-left: 16px;
    padding-right: 20px;

    border-left-color: var(--df-border);

    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.dfb-times-date {
    min-height: 34px;
    margin-bottom: 11px;

    display: flex;
    align-items: center;
}

.dfb-times-date strong {
    color: #40556F;

    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}

.dfb-slots {
    max-height: 360px;
    overflow-y: auto;

    padding-right: 2px;

    scrollbar-width: thin;
}

.dfb-slot-row {
    display: grid;
    grid-template-columns: 1fr 0fr;
    gap: 7px;

    margin-bottom: 8px;

    transition: grid-template-columns .18s ease;
}

.dfb-slot-row.is-selected {
    grid-template-columns: 1fr 1fr;
}

.dfb-slot {
    min-width: 0;
    min-height: 45px;

    padding: 0 10px;

    border: 1px solid #006BFF;
    border-radius: 6px;

    background: #fff;
    color: #005AD8;

    font: inherit;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease;
}

.dfb-slot:hover {
    background: #F4F8FF;
}

.dfb-slot-row.is-selected .dfb-slot {
    background: #6B7280;
    border-color: #6B7280;
    color: #fff;
}

.dfb-next-inline {
    min-width: 0;
    overflow: hidden;

    padding: 0;

    border: 1px solid #006BFF;
    border-radius: 6px;

    background: #006BFF;
    color: #fff;

    font: inherit;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;

    opacity: 0;
    pointer-events: none;

    cursor: pointer;

    transition: opacity .15s ease;
}

.dfb-slot-row.is-selected .dfb-next-inline {
    padding: 0 10px;

    opacity: 1;
    pointer-events: auto;
}

.dfb-next-inline:hover {
    background: #0057D6;
    border-color: #0057D6;
}

.dfb-empty,
.dfb-loading {
    padding: 34px 8px;

    text-align: center;

    color: var(--df-muted);

    font-size: 12px;
    line-height: 1.55;
}

.dfb-loading::before {
    content: "";

    display: block;

    width: 22px;
    height: 22px;

    margin: 0 auto 9px;

    border: 2px solid #DCE6F2;
    border-top-color: #006BFF;
    border-radius: 50%;

    animation: dfbSpin .7s linear infinite;
}

@keyframes dfbSpin {
    to { transform: rotate(360deg); }
}


/* =========================================================
   DETAILS STEP
   ========================================================= */

.dfb-details-head {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: start;

    padding: 22px 28px 5px;
}

.dfb-back {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #006BFF;

    cursor: pointer;
}

.dfb-back:hover {
    background: #F0F6FF;
}

.dfb-summary-time {
    margin: 8px 0 0;

    color: #40556F;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.dfb-summary-timezone {
    margin: 3px 0 0;

    color: var(--df-muted);

    font-size: 11px;
    line-height: 1.4;
}

.dfb-form {
    padding: 10px 28px 22px;
}

.dfb-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
}

.dfb-full {
    grid-column: 1 / -1;
}

.dfb-form label > span {
    display: block;

    margin-bottom: 6px;

    color: var(--df-ink);

    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
}

.dfb-form label > span b {
    color: var(--df-purple);
}

.dfb-form label > span em {
    color: var(--df-muted);
    font-style: normal;
    font-weight: 400;
}

.dfb-form input,
.dfb-form textarea {
    width: 100%;

    padding: 9px 11px;

    border: 1px solid #C7D0DD;
    border-radius: 6px;

    outline: none;

    background: #fff;
    color: var(--df-ink);

    font: inherit;
    font-size: 12px;

    transition: border-color .18s ease, box-shadow .18s ease;
}

.dfb-form input {
    min-height: 39px;
}

.dfb-form textarea {
    min-height: 68px;
    resize: vertical;
}

.dfb-form input:focus,
.dfb-form textarea:focus {
    border-color: #006BFF;

    box-shadow: 0 0 0 2px rgba(0,107,255,.08);
}

.dfb-form input.is-invalid,
.dfb-form textarea.is-invalid {
    border-color: #D46060;
}


.dfb-legal {
    margin: 10px 0;

    color: var(--df-muted);

    font-size: 9px;
    line-height: 1.5;
}

.dfb-legal a {
    color: #005AD8 !important;
    text-decoration: none !important;
}

.dfb-primary {
    min-height: 41px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 20px;

    border: 1px solid var(--df-purple);
    border-radius: 6px;

    background: var(--df-purple);
    color: #fff !important;

    font: inherit;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;

    cursor: pointer;

    transition: background .18s ease, border-color .18s ease;
}

.dfb-primary:hover:not(:disabled) {
    background: var(--df-purple-dark);
    border-color: var(--df-purple-dark);
}

.dfb-confirm {
    min-width: 150px;
}

.dfb-spinner {
    display: none;

    width: 14px;
    height: 14px;

    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;

    animation: dfbSpin .7s linear infinite;
}

.dfb-confirm.is-loading .dfb-spinner {
    display: inline-block;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.dfb-success {
    padding: 94px 42px 50px;

    text-align: center;

    animation: dfbFade .22s ease both;
}

.dfb-success-mark {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    margin: 0 auto 17px;

    border: 1px solid #BFE7CE;
    border-radius: 50%;

    background: #EEFBF2;
    color: #0F9B53;

    font-size: 20px;
    font-weight: 800;
}

.dfb-success > p {
    margin: 10px auto 0;

    color: var(--df-text);

    font-size: 13px;
    line-height: 1.55;
}

.dfb-success-details {
    max-width: 380px;

    margin: 25px auto 22px;
    padding: 16px 0;

    border-top: 1px solid var(--df-border);
    border-bottom: 1px solid var(--df-border);
}

.dfb-success-details span,
.dfb-success-details strong {
    display: block;
}

.dfb-success-details span {
    color: var(--df-muted);

    font-size: 11px;
}

.dfb-success-details strong {
    margin-top: 5px;

    color: var(--df-ink);

    font-size: 13px;
}


/* Shortcode fallback button */
.dfb-booking-shortcode-btn {
    padding: 12px 18px;

    border: 0;
    border-radius: 7px;

    background: var(--df-purple, #5F1EF1);
    color: #fff;

    font-weight: 700;
    cursor: pointer;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 780px) {

    .dfb-modal {
        width: min(650px, calc(100vw - 30px));
        height: auto;
        grid-template-columns: 1fr;
        max-height: calc(100vh - 30px);

        overflow-y: auto;
    }

    .dfb-sidebar {
        min-height: 0;
        padding: 26px 60px 22px 24px;

        border-right: 0;
        border-bottom: 1px solid var(--df-border);
    }

    .dfb-sidebar h2 {
        font-size: 23px;
    }

    .dfb-meeting-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 14px 24px;

        margin-top: 18px;
    }

    .dfb-meta-row {
        margin: 0;
    }

    .dfb-sidebar-links {
        display: none;
    }

    .dfb-schedule-stage.has-date {
        grid-template-columns: minmax(0,1fr) 210px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

    /* Keep the booking experience as a real modal on phones instead of
       allowing the calendar/details screens to become a full-page sheet. */
    .dfb-overlay {
        padding: 16px 10px;
        place-items: center;
        overflow: hidden;
    }

    .dfb-modal {
        width: min(430px, calc(100vw - 20px));
        height: min(760px, calc(100vh - 32px));
        height: min(760px, calc(100dvh - 32px));
        min-height: 0;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);

        display: flex;
        flex-direction: column;

        overflow: hidden;
        border-radius: 14px;

        transform: translateY(18px);
    }

    .dfb-sidebar {
        flex: 0 0 auto;
        padding: 18px 52px 14px 18px;
    }

    .dfb-main {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .dfb-organizer {
        font-size: 12px;
    }

    .dfb-sidebar h2 {
        font-size: 21px;
    }

    .dfb-meeting-meta {
        display: block;
        margin-top: 12px;
    }

    .dfb-meta-row {
        margin-bottom: 8px;
        font-size: 11px;
        line-height: 1.35;
    }

    .dfb-main-title {
        padding: 18px 18px 8px;
    }

    .dfb-main-title h3,
    .dfb-details-head h3,
    .dfb-success h3 {
        font-size: 21px;
    }

    .dfb-schedule-stage,
    .dfb-schedule-stage.has-date {
        display: block;
        min-height: 0;
    }

    .dfb-calendar-column {
        padding: 10px 14px 16px;
    }

    .dfb-day {
        width: 39px;
        height: 39px;
    }

    .dfb-timezone {
        margin-top: 18px;
    }

    .dfb-times-column {
        display: none;
        padding: 15px 18px 18px !important;
        border-top: 1px solid var(--df-border);
        border-left: 0 !important;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: hidden;
    }

    .dfb-schedule-stage.has-date .dfb-times-column {
        display: block;
    }

    /* Time options stay inside the modal and get their own scroll area. */
    .dfb-slots {
        max-height: 220px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
    }

    .dfb-slot-row.is-selected {
        grid-template-columns: 1fr 1fr;
    }

    .dfb-details-head {
        padding: 18px 18px 6px;
    }

    .dfb-form {
        padding: 12px 18px 20px;
    }

    .dfb-form-grid {
        grid-template-columns: 1fr;
    }

    .dfb-full {
        grid-column: auto;
    }

    .dfb-confirm {
        width: 100%;
    }

    .dfb-alert {
        margin-left: 20px;
        margin-right: 20px;
    }

    .dfb-success {
        padding: 55px 20px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dfb-overlay,
    .dfb-modal,
    .dfb-step,
    .dfb-schedule-stage,
    .dfb-times-column,
    .dfb-day,
    .dfb-slot-row {
        transition: none !important;
        animation: none !important;
    }
}
