[x-cloak] {
    display: none !important;
}

@import "https://unpkg.com/open-props/colors.min.css";
@import "https://unpkg.com/open-props/sizes.min.css";
@import "https://unpkg.com/open-props/borders.min.css";
@import "https://unpkg.com/open-props/shadows.min.css";
@import "https://unpkg.com/open-props/fonts.min.css";
@import "https://unpkg.com/open-props/easings.min.css";

.pac-container {
    display: none !important;
}

:root {
    --brand-blue: var(--blue-6);
    --bg-gray: var(--gray-2);
    --text-dark: var(--gray-9);
    --card-max-width: 701px;
    --card-max-height: 456px;
    --content-max-width: 500px;
    --footer-height: 64px;
}

/* ========================================
   BASE STYLES
   ========================================
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background-color: var(--gray-0);
    font-family: "Inter", sans-serif;
    padding: var(--size-3) var(--size-2);
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* ========================================
   CONTAINER COMPONENT
   ========================================
*/
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0 auto;
    max-width: var(--size-content-4);
    padding: 0 var(--size-4);
    width: 100%;
}

/* ========================================
   PANEL COMPONENT
   ========================================
*/
.panel {
    width: 100%;
    max-width: var(--card-max-width);
    max-height: 95vh;
    background: var(--gray-0);
    border: var(--border-size-1) solid var(--gray-2);
    border-radius: var(--radius-3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel__scrollable {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    padding: 60px 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-4) transparent;
}
.panel__scrollable::-webkit-scrollbar {
    width: 8px;
}
.panel__scrollable::-webkit-scrollbar-track {
    background: transparent;
}
.panel__scrollable::-webkit-scrollbar-thumb {
    background: var(--gray-4);
    border-radius: 4px;
}

.panel__footer {
    height: var(--size-9);
    background: var(--gray-1);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--size-5);
    border-top: var(--border-size-1) solid var(--gray-2);
    z-index: 10;
    flex-shrink: 0;
}

/* ========================================
   LAYOUT COMPONENT
   ========================================
*/
.layout {
    display: flex;
    gap: var(--size-4);
    width: 100%;
    max-width: var(--size-15);
    padding: 0 var(--size-3);
}

.layout--column {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ========================================
   MEDIA COMPONENT
   ========================================
*/
.media {
    width: var(--size-8);
    height: var(--size-8);
    border-radius: var(--radius-round);
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(1, 202, 229, 0.2) 100%
        ),
        var(--gray-0);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.media__icon {
    width: auto;
    height: 30px;
}

/* ========================================
   FORM COMPONENT
   ========================================
*/
.form {
    display: flex;
    flex-direction: column;
    gap: var(--size-3);
    width: 100%;
}

.form__header {
    display: flex;
    flex-direction: column;
    gap: var(--size-2);
    margin-bottom: var(--size-4);
}

/* ========================================
   SLIDE COMPONENT
   ========================================
*/
.slide {
    width: 100%;
    min-width: 0;
}

/* ========================================
   PROGRESS COMPONENT
   ========================================
*/
.progress {
    display: flex;
    align-items: center;
    gap: var(--size-3);
}

.progress__counter {
    font-weight: 400;
    font-size: var(--font-size-0);
    color: var(--gray-12);
}

.progress__bar {
    flex: 1;
    height: var(--size-2);
    background: var(--gray-2);
    max-width: var(--size-9);
    border-radius: 16px;
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    background: var(--brand-blue);
    will-change: width;
    transition: width 0.3s;
}

/* ========================================
   INFO BOX COMPONENT
   ========================================
*/
.info-box {
    background: var(--gray-2);
    border-radius: var(--size-2) var(--size-4) var(--size-2);
    padding: var(--size-3);
    width: 100%;
}

/* Only add margin if not inside form__header */
.info-box:not(.form__header .info-box):not(:last-child) {
    margin-bottom: var(--size-5);
}

/* ========================================
   HEADING COMPONENT
   ========================================
*/
.heading {
    font-weight: 500;
    font-size: var(--font-size-1);
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   TEXT COMPONENT
   ========================================
*/
.text {
    font-size: var(--font-size-0);
    color: var(--text-dark);
}

/* ========================================
   INPUT COMPONENT
   ========================================
*/
.input {
    width: 100%;
    height: var(--size-8);
    background: var(--gray-0);
    box-shadow: var(--shadow-1);
    border-radius: var(--size-2);
    border: var(--border-size-2) solid transparent;
    padding: 0 var(--size-3);
    font-size: var(--font-size-1);
    color: var(--gray-9);
    font-family: inherit;
}
.input:focus {
    outline: none;
    border-color: var(--gray-3);
}

.input--error {
    border-color: var(--red-3);
    background-color: var(--red-0);
}

.input--select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.input--select:invalid {
    color: var(--gray-4);
}
.input--select option {
    color: var(--gray-9);
}

.input__wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.input__wrapper:not(:first-child) {
    margin-top: var(--size-3);
}

.input__error-text {
    display: block;
    margin-top: var(--size-1);
    font-size: 12px;
    color: var(--red-6);
    line-height: 1.4;
}

.input__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-0);
    color: var(--text-dark);
}
.input__label .input {
    max-width: 200px;
}

/* ========================================
   LIST COMPONENT
   ========================================
*/
.list {
    display: flex;
    flex-direction: column;
    gap: var(--size-2);
    padding-bottom: var(--size-4);
    padding-left: var(--size-4);
}

/* ========================================
   LABEL COMPONENT
   ========================================
*/
.label {
    display: flex;
    align-items: center;
    padding: var(--size-2) var(--size-3);
    background: var(--gray-2);
    border-radius: var(--size-2);
    cursor: pointer;
    transition: background 0.2s var(--ease-3);
    user-select: none;
}
.label:not(:first-child) {
    margin-top: var(--size-3);
}
.label:hover {
    background: var(--gray-3);
}
.list .label {
    margin: 0;
}

.label--confirm {
    margin-bottom: var(--size-5);
}

.label__text {
    font-size: var(--font-size-0);
    color: var(--text-dark);
}

.label__subtext {
    margin-top: var(--size-3);
    color: var(--gray-5);
    font-size: 13px;
}
input + .label__subtext,
select + .label__subtext {
    margin-top: var(--size-1);
    margin-bottom: var(--size-3);
}

/* ========================================
   CHOICE COMPONENT (Radio/Checkbox)
   ========================================
*/
.choice {
    appearance: none;
    background-color: var(--gray-0);
    margin: 0;
    margin-right: 8px;
    font: inherit;
    width: 20px;
    height: 20px;
    border: var(--border-size-2) solid var(--gray-4);
    border-radius: var(--radius-round);
    display: grid;
    place-content: center;
    color: var(--brand-blue);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 120ms var(--ease-3);
}
.choice::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    transform: scale(0);
    transition: transform 120ms var(--ease-3);
    box-shadow: inset 1em 1em var(--brand-blue);
}
.choice:checked {
    border-color: var(--brand-blue);
}
.choice:checked::before {
    transform: scale(1);
}

.choice--checkbox {
    border-radius: var(--size-1);
}
.choice--checkbox::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 0;
    transform: scale(0);
    transition: transform 120ms var(--ease-3);
    background-color: var(--brand-blue);
    box-shadow: none;
    border: none;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.choice--checkbox:checked::before {
    transform: scale(1);
}

/* ========================================
   BUTTON COMPONENT
   ========================================
*/
.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-2);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: var(--font-weight-5);
    font-size: var(--font-size-0);
    height: var(--size-6);
    padding: var(--size-3) var(--size-4);
    flex: 0 0 auto;
    transition:
        opacity var(--duration-fast) var(--ease-3),
        transform var(--duration-instant) var(--ease-3);
}
.btn:hover {
    opacity: var(--opacity-9);
}
.btn:active {
    transform: translateY(var(--size-1));
}
.btn:disabled {
    opacity: var(--opacity-4);
    cursor: not-allowed;
}
.btn:focus-visible {
    outline: var(--border-size-2) solid var(--brand-blue);
    outline-offset: var(--size-2);
}

.btn--primary {
    background: var(--brand-blue);
    color: var(--gray-0);
}

.btn--secondary {
    background: var(--gray-2);
    color: var(--text-dark);
}
.btn--secondary:disabled {
    background: var(--gray-3);
    color: var(--gray-9);
}

/* ========================================
   ADDRESS COMPONENT
   ========================================
*/
.address-list {
    margin-top: var(--size-2);
    margin-bottom: var(--size-2);
    border: var(--border-size-1) solid var(--gray-2);
    border-radius: var(--size-2);
    background: var(--gray-0);
    overflow: hidden;
}

.address-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-6);
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: var(--border-size-1) solid var(--gray-1);
    transition: background 0.2s;
}
.address-list__item:last-child {
    border-bottom: none;
}
.address-list__item:hover {
    background: var(--gray-1);
}

.address-list__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-9);
}

.address-list__text {
    font-size: 14px;
    color: var(--gray-7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.address-list__text strong {
    color: var(--gray-9);
    font-weight: 600;
}

/* ========================================
   SUMMARY BOX COMPONENT
   ========================================
*/
.summary {
    background: var(--gray-1);
    border-radius: var(--size-2);
    padding: var(--size-4);
    margin-bottom: var(--size-4);
    border: var(--border-size-1) solid var(--gray-3);
}

.summary__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-9);
    margin: 0 0 var(--size-3) 0;
}

.summary__list {
    display: flex;
    flex-direction: column;
    gap: var(--size-2);
}

.summary__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary__label {
    color: var(--gray-6);
    font-size: 13px;
}

.summary__value {
    color: var(--gray-9);
    font-size: 13px;
    text-align: right;
    max-width: 60%;
}

/* ========================================
   SUCCESS COMPONENT
   ========================================
*/
.success {
    text-align: center;
    padding: var(--size-fluid-2) var(--size-5);
}

.success h1,
.success h2,
.success h3,
.success h4,
.success h5,
.success h6 {
    max-inline-size: unset;
}

.success__icon {
    width: var(--size-fluid-4);
    height: var(--size-fluid-4);
    margin: 0 auto var(--size-6) auto;
}

.success__title {
    font-size: var(--font-size-3);
    font-weight: 600;
    color: var(--gray-9);
    margin: 0 0 var(--size-4) 0;
}

.success__message {
    font-size: var(--font-size-1);
    color: var(--gray-9);
    margin: 0 0 var(--size-3) 0;
    line-height: 1.5;
}

.success__subtext {
    font-size: var(--font-size-0);
    color: var(--gray-6);
    margin: 0;
}

/* ========================================
   FOOTER COMPONENT
   ========================================
*/
.footer {
    text-align: center;
    padding: var(--size-3);
    font-size: 12px;
    color: var(--gray-5);
}

.footer__copyright {
    font-size: 12px;
    color: var(--gray-5);
    text-align: center;
}

/* ========================================
   UTILITY CLASSES
   ========================================
*/
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   LEGACY COMPATIBILITY (remove after HTML update)
   ========================================
*/
/* Keep old class names temporarily */
.scrollable {
    composes: panel__scrollable;
}
.panel-footer {
    composes: panel__footer;
}
.media svg {
    composes: media__icon;
    width: 32px;
    height: auto;
}
.progress-wrapper {
    composes: progress;
}
.counter {
    composes: progress__counter;
}
.progress-bar {
    composes: progress__bar;
}
.progress-fill {
    composes: progress__fill;
}
.error-text {
    composes: input__error-text;
}
.input-wrapper {
    composes: input__wrapper;
}
select.input {
    composes: input--select;
}
select.input:invalid {
    color: var(--gray-4);
}
select.input option {
    color: var(--gray-9);
}
.label-text {
    composes: label__text;
}
.label-subtext {
    composes: label__subtext;
}
input[type="checkbox"].choice {
    composes: choice--checkbox;
}
.copyright {
    composes: footer__copyright;
}
.success-content {
    composes: success;
}
.success-icon {
    composes: success__icon;
}
.success-title {
    composes: success__title;
}
.success-message {
    composes: success__message;
}
.success-subtext {
    composes: success__subtext;
}
.address-item {
    composes: address-list__item;
}
.address-list__icon svg {
    color: var(--gray-9);
}
.address-text {
    composes: address-list__text;
}

/* Additional legacy support */
.input + .input,
.list + .input,
.input + .list,
label + .input,
label + select {
    margin-top: var(--size-3);
}

label .input {
    max-width: 200px;
}

label:has(.input) {
    justify-content: space-between;
}

label span {
    font-size: var(--font-size-0);
    color: var(--text-dark);
}

.list + input {
    margin-top: 0;
}

input + .label-subtext {
    margin-bottom: var(--size-1);
}

/* ========================================
   MEDIA QUERIES
   ========================================
*/
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        align-items: center;
    }
    .media {
        margin: 0 auto;
    }
    .input-wrapper + .input-wrapper,
    .input__wrapper + .input__wrapper {
        margin-top: var(--size-3);
    }
    .input-wrapper:not(:has(+ .input-wrapper)),
    .input__wrapper:not(:has(+ .input__wrapper)) {
        margin-bottom: var(--size-3);
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .scrollable,
    .panel__scrollable {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .info-box,
    .input--text {
        text-align: center;
    }
    .label {
        justify-content: flex-start;
    }
    .scrollable,
    .panel__scrollable {
        padding: 20px;
    }
    .list {
        padding-bottom: var(--size-3);
        padding-left: var(--size-3);
    }
}
