/* Medibox 3.13.31 — professional appointment form
   Visual and interaction layer only. The modal dimensions remain unchanged. */

.appointment-form-pro {
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 12px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 100% 0, rgba(79, 70, 229, .055), transparent 20rem),
        linear-gradient(180deg, #f8faff 0%, #f4f7fb 100%);
}

.appointment-pro-panel,
.appointment-pro-grid {
    min-width: 0;
}

.appointment-pro-panel {
    padding: 12px;
    border: 1px solid #dde5f2;
    border-radius: 15px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 22px rgba(45, 57, 126, .055);
}

.appointment-pro-time-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
    gap: 10px;
    align-items: stretch;
}

.appointment-time-summary-pro {
    min-height: 52px;
    padding: 10px 12px;
    border-color: #d8def9;
    background: linear-gradient(135deg, #f0f2ff 0%, #f4fcf9 100%);
    color: #26375b;
}

.appointment-time-summary-pro > .ui-icon {
    width: 21px;
    height: 21px;
    color: #4f46e5;
}

.appointment-time-summary-pro strong {
    color: #26375b;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.appointment-time-summary-pro > span {
    color: #0f8a61;
    background: #e7faf4;
}

.appointment-control {
    position: relative;
    min-width: 0;
    min-height: 52px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d7e0ed;
    border-radius: 13px;
    background: #fff;
    color: #61708b;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.appointment-control:focus-within {
    border-color: #9fa8f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}

.appointment-control > .ui-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: #4f46e5;
}

.appointment-control input,
.appointment-control select,
.appointment-control textarea {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #26344f;
    font: inherit;
}

.appointment-control input,
.appointment-control select {
    min-height: 48px;
}

.appointment-control select {
    padding-right: 28px;
    appearance: none;
    cursor: pointer;
}

.appointment-control-chevron {
    position: absolute;
    right: 12px;
    width: 15px !important;
    height: 15px !important;
    pointer-events: none;
    color: #8490a8 !important;
}

.appointment-patient-panel {
    padding: 11px;
}

.appointment-form-pro .patient-search-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 9px;
}

.appointment-form-pro .patient-search-input-wrap {
    min-height: 50px;
    padding: 0 13px;
    border-color: #d7e0ed;
    border-radius: 13px;
    background: #fff;
}

.appointment-form-pro .patient-search-input-wrap:focus-within {
    border-color: #9fa8f1;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}

.appointment-form-pro .patient-search-input-wrap .ui-icon {
    color: #4f46e5;
}

.appointment-form-pro #openQuickPatient {
    width: 48px;
    height: 50px;
    min-width: 48px;
    border-radius: 13px;
}

.appointment-form-pro .patient-search-results {
    top: 58px;
    right: 57px;
    border-color: #d7e0ed;
    box-shadow: 0 18px 42px rgba(35, 42, 96, .18);
}

.appointment-form-pro .selected-patient-card {
    border-color: #cfd7fb;
    background: linear-gradient(135deg, #f1f3ff, #f1fcf8);
}

.appointment-pro-grid {
    display: grid;
    gap: 10px;
}

.appointment-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-reason-panel {
    display: grid;
    gap: 11px;
}

.appointment-reason-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.appointment-reason-button {
    min-width: 0;
    min-height: 47px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #d9e1ed;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f8faff);
    color: #465670;
    font: inherit;
    font-size: 11px;
    font-weight: 820;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.appointment-reason-button .ui-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.appointment-reason-button:hover {
    transform: translateY(-1px);
    border-color: #bdc7ee;
    color: #4f46e5;
    box-shadow: 0 7px 16px rgba(79, 70, 229, .10);
}

.appointment-reason-button.is-active {
    border-color: #8e91ee;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .22);
}

.appointment-reason-button-alert:not(.is-active) .ui-icon {
    color: #d97706;
}

.appointment-notes-control {
    min-height: 58px;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 10px;
}

.appointment-notes-control textarea {
    min-height: 42px;
    resize: vertical;
    line-height: 1.45;
}

.appointment-form-pro .status-default-note {
    padding: 9px 11px;
    border: 1px solid #cfeee3;
    background: #eefbf6;
    color: #2f6454;
}

.appointment-form-pro .status-default-note .ui-icon {
    color: #10b981;
}

@media (max-width: 720px) {
    .appointment-form-pro {
        padding: 11px !important;
        gap: 9px;
        background: #f4f7fb;
    }

    .appointment-pro-panel {
        padding: 10px;
        border-radius: 14px;
    }

    .appointment-pro-time-panel,
    .appointment-team-grid {
        grid-template-columns: 1fr;
    }

    .appointment-pro-time-panel {
        gap: 8px;
    }

    .appointment-time-summary-pro,
    .appointment-control,
    .appointment-form-pro .patient-search-input-wrap,
    .appointment-form-pro #openQuickPatient {
        min-height: 50px;
    }

    .appointment-time-summary-pro strong {
        font-size: 12.5px;
    }

    .appointment-reason-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .appointment-reason-button {
        min-height: 48px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .appointment-notes-control {
        min-height: 58px;
    }

    .appointment-notes-control textarea {
        min-height: 40px !important;
        font-size: 15px !important;
    }
}

/* Medibox 3.13.32 — larger modern appointment modal
   Only the appointment dialog is enlarged. Reason and chair selections use native radio cards. */

.appointment-modal-modern {
    overflow: hidden;
    border: 1px solid rgba(207, 216, 239, .95);
    background: #f8faff;
    box-shadow: 0 34px 90px rgba(26, 32, 84, .30);
}

.appointment-modal-modern .appointment-modal-header-modern {
    min-height: 76px;
    padding-top: 14px;
    padding-bottom: 14px;
    background:
        radial-gradient(circle at 90% 0, rgba(16, 185, 129, .10), transparent 13rem),
        linear-gradient(135deg, #ffffff 0%, #f5f7ff 72%, #f0fbf7 100%);
    border-bottom: 1px solid #dfe5f2;
}

.appointment-modal-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.appointment-modal-heading-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid #d7dcfb;
    border-radius: 15px;
    color: #4f46e5;
    background: linear-gradient(145deg, #eef1ff, #e7faf4);
    box-shadow: 0 9px 20px rgba(79, 70, 229, .13);
}

.appointment-modal-heading-icon .ui-icon {
    width: 23px;
    height: 23px;
}

.appointment-modal-modern .modal-header h2 {
    margin: 0;
    color: #1f2a44;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.025em;
}

.appointment-modal-modern .appointment-form-pro {
    background:
        radial-gradient(circle at 100% 0, rgba(79, 70, 229, .07), transparent 23rem),
        radial-gradient(circle at 0 100%, rgba(16, 185, 129, .065), transparent 21rem),
        linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
}

.appointment-modal-modern .appointment-pro-panel {
    border-color: #dbe3f0;
    border-radius: 17px;
    box-shadow: 0 10px 25px rgba(43, 54, 123, .065);
}

.appointment-chair-fieldset,
.appointment-reason-panel {
    min-width: 0;
    margin: 0;
}

.appointment-chair-fieldset {
    border: 0;
}

.appointment-team-panel {
    padding: 12px;
}

.appointment-team-modern-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(230px, .78fr) minmax(0, 1.42fr);
    gap: 11px;
    align-items: stretch;
}

.appointment-dentist-control {
    height: 100%;
    min-height: 64px;
}

.appointment-chair-fieldset {
    padding: 0;
}

.appointment-chair-options {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.appointment-chair-button {
    position: relative;
    min-width: 0;
    min-height: 64px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #d8e0ed;
    border-radius: 13px;
    background: linear-gradient(180deg, #fff, #f8faff);
    color: #465670;
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.appointment-chair-button input,
.appointment-reason-button input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.appointment-chair-button:hover {
    transform: translateY(-1px);
    border-color: #bdc8ed;
    color: #4f46e5;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .10);
}

.appointment-chair-button:focus-within {
    border-color: #8f93ec;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

.appointment-chair-button.is-active {
    border-color: #8c91ed;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 9px 20px rgba(79, 70, 229, .22);
}

.appointment-chair-button-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #4f46e5;
    background: #eef2ff;
}

.appointment-chair-button.is-active .appointment-chair-button-icon {
    color: #fff;
    background: rgba(255,255,255,.17);
}

.appointment-chair-button-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.appointment-chair-button-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.appointment-chair-button-copy strong,
.appointment-chair-button-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-chair-button-copy strong {
    font-size: 12px;
    font-weight: 850;
}

.appointment-chair-button-copy small {
    color: #7b879b;
    font-size: 9px;
}

.appointment-chair-button.is-active .appointment-chair-button-copy small {
    color: rgba(255,255,255,.78);
}

.appointment-reason-panel {
    padding: 13px;
    border: 1px solid #dbe3f0;
}

.appointment-reason-button {
    position: relative;
    min-height: 58px;
    padding: 9px 11px;
    flex-direction: column;
    gap: 5px;
    user-select: none;
}

.appointment-reason-button:focus-within {
    border-color: #8f93ec;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

.appointment-reason-button-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #4f46e5;
    background: #eef2ff;
}

.appointment-reason-button-icon .ui-icon {
    width: 15px;
    height: 15px;
}

.appointment-reason-button.is-active .appointment-reason-button-icon {
    color: #fff;
    background: rgba(255,255,255,.17);
}

.appointment-reason-button-alert:not(.is-active) .appointment-reason-button-icon {
    color: #d97706;
    background: #fff5dd;
}

.appointment-modal-modern .modal-footer {
    min-height: 76px;
    background: rgba(255,255,255,.96);
    border-top: 1px solid #dfe5f1;
    box-shadow: 0 -8px 26px rgba(41, 50, 112, .045);
}

.appointment-modal-modern .modal-footer .btn {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
}

@media (min-width: 901px) {
    .appointment-modal-modern.standard-edit-dialog {
        width: min(1040px, calc(100vw - 44px)) !important;
        max-width: 1040px !important;
        max-height: calc(100dvh - 38px) !important;
    }

    .appointment-modal-modern.standard-edit-dialog > form {
        max-height: calc(100dvh - 38px) !important;
    }

    .appointment-modal-modern .appointment-form-pro {
        padding: 19px 22px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .appointment-modal-modern .appointment-pro-time-panel,
    .appointment-modal-modern .appointment-reason-panel {
        grid-column: 1 / -1;
    }

    .appointment-modal-modern .appointment-patient-panel,
    .appointment-modal-modern .appointment-team-panel {
        min-height: 90px;
    }
}

@media (max-width: 900px) {
    .appointment-modal-modern .appointment-modal-header-modern {
        min-height: 68px;
    }

    .appointment-modal-heading-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 13px;
    }

    .appointment-modal-modern .modal-header h2 {
        font-size: 19px;
    }

    .appointment-team-modern-grid {
        grid-template-columns: 1fr;
    }

    .appointment-chair-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .appointment-chair-button {
        min-height: 56px;
        padding: 8px;
    }

    .appointment-chair-button-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}

@media (max-width: 420px) {
    .appointment-chair-options {
        grid-template-columns: 1fr;
    }

    .appointment-reason-button {
        min-height: 54px;
    }
}

/* Medibox 3.13.33 — professional doctor/chair dropdowns and pure reason buttons */
.appointment-modal-heading > h2 {
    display: block;
    margin: 0;
    align-self: center;
    white-space: nowrap;
}

.appointment-team-modern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.appointment-team-select {
    position: relative;
    min-height: 68px;
    height: 68px;
    padding: 0 46px 0 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #d6dfed;
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 8px 20px rgba(43, 54, 123, .055);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.appointment-team-select:hover {
    transform: translateY(-1px);
    border-color: #bbc8e8;
    background: #fff;
    box-shadow: 0 11px 24px rgba(60, 70, 148, .09);
}

.appointment-team-select:focus-within {
    border-color: #818cf8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .13), 0 11px 24px rgba(60, 70, 148, .09);
}

.appointment-select-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #4f46e5;
    background: linear-gradient(145deg, #eef2ff, #e7faf4);
}

.appointment-select-icon .ui-icon {
    width: 19px;
    height: 19px;
}

.appointment-team-select select {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0 !important;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    color: #263550;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none !important;
}

.appointment-team-select .appointment-control-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #73819a;
    pointer-events: none;
    transform: translateY(-50%);
}

.appointment-reason-button {
    appearance: none;
    -webkit-appearance: none;
    border-style: solid;
    font-family: inherit;
}

.appointment-reason-button:focus-visible {
    outline: 0;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

@media (max-width: 700px) {
    .appointment-team-modern-grid {
        grid-template-columns: 1fr;
    }

    .appointment-team-select {
        min-height: 62px;
        height: 62px;
    }

    .appointment-modal-heading > h2 {
        white-space: normal;
    }
}


/* Medibox 3.13.35 — simplified single-column appointment dialog */
.appointment-modal-modern.standard-edit-dialog {
    width: min(760px, calc(100vw - 32px)) !important;
    max-width: 760px !important;
}

.appointment-modal-modern .appointment-form-pro {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 15px 17px !important;
    background: #f6f8fc;
}

.appointment-modal-modern .appointment-pro-panel,
.appointment-modal-modern .appointment-pro-time-panel,
.appointment-modal-modern .appointment-patient-panel,
.appointment-modal-modern .appointment-team-panel,
.appointment-modal-modern .appointment-reason-panel {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    padding: 10px !important;
    border: 1px solid #dde4ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
}

.appointment-modal-modern .appointment-pro-time-panel,
.appointment-modal-modern .appointment-team-modern-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
}

.appointment-modal-modern .appointment-time-summary-pro,
.appointment-modal-modern .appointment-control,
.appointment-modal-modern .appointment-team-select,
.appointment-modal-modern .appointment-form-pro .patient-search-input-wrap {
    min-height: 52px;
    height: auto;
    border-radius: 11px;
    box-shadow: none;
}

.appointment-modal-modern .appointment-team-select {
    padding: 0 44px 0 12px;
}

.appointment-modal-modern .appointment-select-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
}

.appointment-modal-modern .appointment-select-icon .ui-icon {
    width: 17px;
    height: 17px;
}

.appointment-modal-modern .appointment-reason-panel {
    gap: 8px;
}

.appointment-modal-modern .appointment-reason-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.appointment-modal-modern .appointment-reason-button {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: 6px 10px;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #dbe2ed;
    border-radius: 9px;
    background: #f8fafc;
    color: #536079;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.1;
    box-shadow: none;
    transform: none;
}

.appointment-modal-modern .appointment-reason-button:hover {
    border-color: #c7d0e8;
    background: #f3f5fb;
    color: #4338ca;
    box-shadow: none;
    transform: none;
}

.appointment-modal-modern .appointment-reason-button-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 6px;
    color: #64748b;
    background: #eef2f7;
}

.appointment-modal-modern .appointment-reason-button-icon .ui-icon {
    width: 12px;
    height: 12px;
}

.appointment-modal-modern .appointment-reason-button.is-active {
    border-color: #bcc5f4;
    background: linear-gradient(135deg, #eef2ff 0%, #e9f9f3 100%);
    color: #4338ca;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, .07);
}

.appointment-modal-modern .appointment-reason-button.is-active .appointment-reason-button-icon {
    color: #4338ca;
    background: rgba(255,255,255,.78);
}

.appointment-modal-modern .appointment-reason-button-alert:not(.is-active) .appointment-reason-button-icon {
    color: #b45309;
    background: #fff7e6;
}

.appointment-modal-modern .appointment-notes-control {
    min-height: 56px;
}

.appointment-modal-modern .status-default-note {
    margin-top: 0;
}

@media (max-width: 780px) {
    .appointment-modal-modern.standard-edit-dialog {
        width: calc(100vw - 16px) !important;
        max-width: none !important;
    }

    .appointment-modal-modern .appointment-form-pro {
        padding: 10px !important;
        gap: 8px !important;
    }

    .appointment-modal-modern .appointment-reason-options {
        gap: 5px;
    }

    .appointment-modal-modern .appointment-reason-button {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 10px;
    }
}


/* Medibox v89 — planned service and total price inside the calendar slot editor. */
.appointment-service-plan-panel {
    grid-column: 1 / -1;
}

.appointment-service-plan-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr);
    gap: 10px;
}

.appointment-service-plan-grid .appointment-control {
    min-height: 56px;
}

@media (max-width: 760px) {
    .appointment-service-plan-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Medibox v90 — clean planned-service fields: visible labels, empty inputs, no border line. */
.appointment-service-plan-grid .appointment-flat-field {
    min-width: 0;
    display: grid;
    gap: 6px;
    align-content: start;
}

.appointment-service-plan-grid .appointment-flat-label {
    display: block;
    margin: 0;
    color: #56647b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.appointment-service-plan-grid .appointment-flat-field input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 0 !important;
    border-radius: 10px;
    outline: 0 !important;
    background: #f4f6fa !important;
    box-shadow: none !important;
    color: #26344f;
    font: inherit;
}

.appointment-service-plan-grid .appointment-flat-field input:focus {
    border: 0 !important;
    outline: 0 !important;
    background: #eef1f7 !important;
    box-shadow: none !important;
}
