/* The dialog of buying from the pricing table (Views/Clinic/Purchase/_PurchaseDialog.cshtml). The colors of the purchase pages: navy, orange and yellow. */
#purchase-dialog {
    --pd-navy: #1e336a;
    --pd-orange: #e45f2b;
    --pd-yellow: #f6c445;
    --pd-bg: #ffffff;
    --pd-soft: #f4f6fb;
    --pd-line: #e3e7f0;
    --pd-text: #1d2433;
    --pd-muted: #6b7486;
    --pd-error: #d6344a;
    --pd-error-soft: #fdecee;
    --pd-ok: #1f8a5b;
}

html[data-theme=dark] #purchase-dialog {
    --pd-navy: #8fb0ff;
    --pd-bg: #1e1e2d;
    --pd-soft: #26263a;
    --pd-line: #323248;
    --pd-text: #e7e9f2;
    --pd-muted: #9a9cae;
    --pd-error: #ff7a8a;
    --pd-error-soft: #3a1f27;
    --pd-ok: #5fd39c;
}

.pd-dialog {
    max-width: 440px;
}

.pd-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: var(--pd-bg);
    color: var(--pd-text);
    box-shadow: 0 24px 60px rgba(16, 24, 48, .28);
}

/* the head: a navy band with the plan and the steps */
.pd-head {
    position: relative;
    background: linear-gradient(160deg, #1e336a 0%, #2a4a94 100%);
    color: #fff;
    padding: 26px 24px 18px;
    text-align: center;
}

.pd-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}

.pd-close:hover, .pd-close:focus { background: rgba(255, 255, 255, .24); outline: none; }
.pd-close i { color: #fff; font-size: .75rem; }

.pd-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: var(--pd-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.pd-icon i { font-size: 1.9rem; color: #1e336a; }

.pd-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}

.pd-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.pd-chip {
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: .85rem;
    white-space: nowrap;
}

.pd-chip:empty { display: none; }

.pd-chip-amount {
    background: var(--pd-orange);
    font-weight: 700;
}

.pd-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
}

.pd-steps li {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pd-steps li + li::before {
    content: "";
    width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, .3);
    margin-left: 6px;
}

.pd-steps li span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
}

.pd-steps li b { font-weight: inherit; }

.pd-steps li.pd-done, .pd-steps li.pd-current { color: #fff; }
.pd-steps li.pd-current span { background: var(--pd-yellow); border-color: var(--pd-yellow); color: #1e336a; font-weight: 700; }
.pd-steps li.pd-done span { background: rgba(255, 255, 255, .9); border-color: transparent; color: #1e336a; }

/* buy or trial */
#purchase-dialog .pd-for-trial,
#purchase-dialog .pd-icon-trial { display: none; }
#purchase-dialog.pd-trial .pd-for-trial { display: inline; }
#purchase-dialog.pd-trial .pd-icon-trial { display: inline-block; }
#purchase-dialog.pd-trial .pd-for-buy,
#purchase-dialog.pd-trial .pd-icon-buy { display: none; }
#purchase-dialog.pd-trial h4.pd-for-trial { display: block; }
#purchase-dialog h4.pd-for-buy { display: block; }
#purchase-dialog.pd-trial h4.pd-for-buy { display: none; }

/* the body */
.pd-body {
    padding: 24px 26px 8px;
}

.pd-pane { display: none; }
.pd-pane.pd-active { display: block; animation: pd-in .25s ease-out; }

@keyframes pd-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.pd-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--pd-text);
}

.pd-mobile-field {
    position: relative;
}

.pd-mobile-field i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--pd-muted);
    pointer-events: none;
}

.pd-input {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: 1.5px solid var(--pd-line);
    background: var(--pd-soft);
    color: var(--pd-text);
    font-size: 1.2rem;
    letter-spacing: .08em;
    text-align: center;
    padding: 0 44px;
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none;
}

.pd-input:focus {
    border-color: var(--pd-navy);
    background: var(--pd-bg);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pd-navy) 15%, transparent) !important;
}

.pd-input.pd-invalid { border-color: var(--pd-error); }

.pd-hint {
    color: var(--pd-muted);
    font-size: .85rem;
    line-height: 1.8;
    margin: 10px 2px 18px;
}

.pd-btn {
    height: 50px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .1s, box-shadow .15s, background .15s;
}

.pd-btn-primary {
    background: var(--pd-orange);
    border: 0;
    color: #fff !important;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--pd-orange) 35%, transparent);
}

.pd-btn-primary:hover, .pd-btn-primary:focus { background: #cf5021; color: #fff; }
.pd-btn-primary:active { transform: translateY(1px); }
.pd-btn-primary:disabled { opacity: .7; }
.pd-btn i { font-size: 1.1rem; color: #fff; }

.pd-terms {
    text-align: center;
    color: var(--pd-muted);
    font-size: .8rem;
    margin: 12px 0 4px;
}

.pd-terms a, .pd-link { color: var(--pd-navy); font-weight: 600; }
.pd-link:hover { color: var(--pd-orange); text-decoration: none; }
.pd-link i { font-size: 1rem; vertical-align: middle; color: inherit; }

.pd-sent {
    text-align: center;
    line-height: 2;
    margin-bottom: 16px;
}

.pd-sent b { font-size: 1.05rem; letter-spacing: .04em; }

.pd-otp { margin-bottom: 14px; }

.pd-otp .z-otp {
    --otp-bg: var(--pd-soft);
    --otp-border: var(--pd-line);
    --otp-text: var(--pd-text);
    --otp-focus: var(--pd-navy);
    --otp-filled: var(--pd-navy);
    --otp-error: var(--pd-error);
}

.pd-resend {
    text-align: center;
    font-size: .88rem;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pd-timer { color: var(--pd-navy); font-weight: 700; font-variant-numeric: tabular-nums; }

.pd-switch {
    display: block;
    text-align: center;
    margin: 14px 0 4px;
    font-size: .9rem;
}

.pd-row-links {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    margin: 10px 2px 18px;
}

.pd-account-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: color-mix(in srgb, var(--pd-yellow) 18%, var(--pd-bg));
    border-radius: 12px;
    padding: 10px 12px;
    font-size: .88rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.pd-account-note i { font-size: 1.4rem; color: var(--pd-navy); }

.pd-alert {
    background: var(--pd-error-soft);
    color: var(--pd-error);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: .9rem;
    margin-bottom: 16px;
    line-height: 1.8;
}

.pd-pane-wait {
    text-align: center;
    padding: 18px 0 22px;
}

.pd-pane-wait h4 { font-size: 1.1rem; font-weight: 700; margin: 18px 0 6px; }

.pd-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid var(--pd-line);
    border-top-color: var(--pd-orange);
    animation: pd-spin .8s linear infinite;
}

@keyframes pd-spin { to { transform: rotate(360deg); } }

.pd-foot {
    padding: 12px 24px 18px;
    text-align: center;
    color: var(--pd-muted);
    font-size: .78rem;
}

.pd-foot i { color: var(--pd-ok); font-size: 1rem; vertical-align: middle; }

/* the buttons of the pricing table */
.pd-start-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-start-buttons .btn { flex: 1 1 180px; height: 50px; border-radius: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pd-start-buttons .btn i { font-size: 1.3rem; }
.pd-start-buttons .btn-trial-start { background: transparent; border: 1.5px solid #1bc5bd; color: #1bc5bd; }
.pd-start-buttons .btn-trial-start:hover { background: #1bc5bd; color: #fff; }
.pd-start-buttons .btn-trial-start:hover i { color: #fff; }
.pd-start-buttons .btn-trial-start i { color: #1bc5bd; }

@media (max-width: 480px) {
    .pd-dialog { margin: 8px; }
    .pd-body { padding: 20px 18px 6px; }
    .pd-head { padding: 22px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-pane.pd-active, .pd-spinner { animation: none; }
}

/* the picture after a wrong code in the dialog */
#purchase-dialog .z-captcha {
    --cap-bg: var(--pd-soft);
    --cap-border: var(--pd-line);
    --cap-text: var(--pd-text);
    --cap-focus: var(--pd-navy);
}
