/* Panel tweaks. Inputs in the forms show only a bottom line instead of a box. */
.fi-main form .fi-input-wrp {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid rgb(0 0 0 / 0.25);
}

.fi-main form .fi-input-wrp:focus-within {
    box-shadow: none;
    border-bottom-color: var(--primary-600);
}

.fi-main form .fi-input-wrp .fi-input {
    padding-inline-start: 0;
}

.dark .fi-main form .fi-input-wrp {
    border-bottom-color: rgb(255 255 255 / 0.3);
}

.dark .fi-main form .fi-input-wrp:focus-within {
    border-bottom-color: var(--primary-500);
}

/* Create / edit screens: form on the left, a phone with the live page on the right. */
.sc-with-phone {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.sc-with-phone__main {
    min-width: 0;
}

.sc-phone-col {
    position: sticky;
    top: 5rem;
}

.sc-phone-toggle {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgb(0 0 0 / 0.2);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.dark .sc-phone-toggle {
    border-color: rgb(255 255 255 / 0.25);
}

/* Narrow windows: the phone is opened with the button. */
.sc-phone-wrap {
    display: none;
}

.sc-phone-wrap.is-open {
    display: block;
}

@media (min-width: 900px) {
    .sc-with-phone {
        grid-template-columns: minmax(0, 1fr) 316px;
    }

    .sc-phone-toggle {
        display: none;
    }

    .sc-phone-wrap {
        display: block;
    }
}

/* 300px phone showing the 390px-wide page scaled down. */
.sc-phone {
    width: 300px;
    margin-inline: auto;
    border: 8px solid #1c1c1e;
    border-radius: 40px;
    background: #fff;
    box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.35);
    overflow: hidden;
}

.sc-phone__screen {
    width: 284px;
    height: min(580px, calc(100vh - 11rem));
    overflow: hidden;
}

.sc-phone__frame {
    display: block;
    width: 390px;
    height: calc(min(580px, 100vh - 11rem) / 0.728);
    border: 0;
    background: #fff;
    transform: scale(0.728);
    transform-origin: 0 0;
}

/* Sign-in and sign-up screens: a larger logo (the menu keeps the smaller one, its bar has a fixed height). */
.fi-simple-layout .fi-simple-header .fi-logo {
    height: 5rem !important;
}
