/* Starbucks Wi-Fi Portal Styles - Dynamic Footer */
/** Custom font faces **/
@font-face {
    font-family: "Lander Short";
    src: url("../../fonts/LanderShort-Light.woff2") format("woff2"),
        url("../../fonts/LanderShort-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SoDo Sans";
    src: url("../../fonts/SoDoSans-Regular.woff2") format("woff2"),
        url("../../fonts/SoDoSans-Regular.woff") format("woff"),
        url("../../fonts/SoDoSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SoDo Sans";
    src: url("../../fonts/SoDoSans-SemiBold.woff2") format("woff2"),
        url("../../fonts/SoDoSans-SemiBold.woff") format("woff"),
        url("../../fonts/SoDoSans-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SoDo Sans";
    src: url("../../fonts/SoDoSans-Bold.woff2") format("woff2"),
        url("../../fonts/SoDoSans-Bold.woff") format("woff"),
        url("../../fonts/SoDoSans-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Properties */
:root {
    --starbucks-green: #006241;
    --starbucks-green-hover: #00754a;
    --starbucks-green-light: #006342;
    --background-cream: #f7f0e4;
    --background-white: #faf7f0;
    --text-primary: #32462f;
    --text-secondary: #415038;
    --text-light: rgba(0, 0, 0, 0.87);
    --border-light: #87847e;
    --input-bg: #fffcf7;
    --error-red: #b23527;
    --error-red-secondary: #e87244;
    --footer-bg: #32462f;
    --footer-text: #f7f0e4;
    --footer-border: #40593c;
    --spacing: 0.25rem;

    /* Font Families */
    --font-lander: "Lander Short", serif;
    --font-sodo: "SoDo Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Mobile first */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-lander);
    background: var(--background-cream);
    color: var(--text-primary);
    line-height: 1.5rem;
    overflow-x: hidden;
}


.form-container-header > h1 {
    display: inline-block;
}

.form-container-header > h1 > span {
    display: block;
    white-space: nowrap;
}

.form-container-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Closed and Offnet Pages - alt page */
.form-container.alt-page {
    margin-top: 0;
}

.content-wrapper.alt-page {
    margin-top: 0;
    margin-left: -64px;
}

.form-container-header.alt-page {
    margin-bottom: 16px;
}

.content-section.alt-page {
    display: contents;
}

.content.alt-page {
    margin: auto;
    padding: 30% 0 !important;
}

/* Main Container */
.main-container {
    display: flex;
    flex-direction: column;
}

/* Content Layout */
.content-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero-section {
    background-image: url(../img/barista-image-mobile.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    min-height: 230px;
}

/* Content Section */
.content-section {
    flex: 1;
}

/* Content Wrapper */
.content-wrapper {
    background: var(--background-cream);
    border-radius: 24px 24px 0 0;
    margin-top: -4vh;
    position: relative;
    display: flex;
    flex-direction: column;
}


/* Content */
.content {
    max-width: 100%;
    margin: 0 auto;
    padding: 32px 20px;
    width: 100%;
}

/* Typography */
h1 {
    font-family: var(--font-lander);
    font-size: 1.8em;
    font-weight: 300;
    line-height: 1.3em;
    text-align: center;
    color: var(--text-primary);
    /* margin-bottom: 1vh; */
}

.subtitle {
    font-family: var(--font-sodo);
    font-style: normal;
    font-weight: 300;
    font-size: 0.9em;
    line-height: 24px;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding: 0 10px;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 32px;
}

/* Form Inputs */
.form-input {
    width: 100%;
    height: 55px;
    line-height: 55px;
    padding: 1.5em 1em 0.5em 1em;
    font-size: 1em;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
    font-family: var(--font-sodo);
    caret-color: var(--starbucks-green-light);
}

.form-input:focus {
    border-color: var(--starbucks-green-light);
    border: 2px solid var(--starbucks-green-light);
}

.form-input .error {
    border: 2px solid var(--error-red);
    padding: 24px 16px 2px 16px;
}

/* Floating Labels */
.floating-label {
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translate(0, -50%);
    color: var(--border-light);
    font-weight: 100;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    font-family: var(--font-sodo);
}

.form-input.error ~ .floating-label {
    transform: translateY(-70%);
    color: var(--error-red);
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    transform: translate(-10%, 10%) scale(0.8);
    color: var(--starbucks-green-light);
}

.form-input.error:focus ~ .floating-label,
.form-input.error:not(:placeholder-shown) ~ .floating-label {
    color: var(--error-red);
}

/* Error Messages */
.error-message {
    display: none;
    position: absolute;
    align-items: center;
    gap: 8px;
    padding: 0 1.3em;
    height: 32px;
    font-size: 0.75em;
    line-height: 32px;
    font-weight: 300;
    color: var(--error-red);
    font-family: var(--font-sodo);
}

.error-message.show {
    display: flex;
}

.error-icon {
    width: 13px;
}

/* Disclaimer */
.disclaimer {
    font-family: var(--font-sodo);
    font-style: normal;
    font-weight: 400;
    font-size: 0.75em;
    line-height: 1.6em;
    text-align: center;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 24px;
}

/* CTA Button */
.btn-connect {
    width: 100%;
    margin: auto;
    height: 44px;
    background: var(--starbucks-green-light);
    color: var(--background-white);
    border: 0;
    border-radius: 44px;
    font-family: var(--font-sodo);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.07), 0px 3px 4px rgba(0, 0, 0, 0.06),
        0px 1px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-connect:hover {
    background: var(--starbucks-green-hover);
    transform: translateY(-1px);
}

.btn-connect:active {
    transform: translateY(0);
}


/* Footer */
footer {
    background: var(--background-white);
    padding: 0;
    margin-top: auto;
}

.footer-divider {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
}

.footer-divider::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.26);
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
    width: fit-content;
}

.footer-links a {
    color: #000;
    font-size: 0.8em;
    font-weight: 300;
    line-height: 1.1em;
    padding: 15px 0;
    font-family: var(--font-sodo);
    display: block;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.7em;
    line-height: 1.1em;
    color: rgba(0, 0, 0, 0.58);
    padding: 15px 0 0;
    font-family: var(--font-sodo);
}

/* Small tablet/large phones */
@media (min-width: 600px) {
    .content {
        width: 70vw;
    }

    .footer-content {
        padding: 3vw 20vw;
    }

    .footer-divider {
        width: 70vw;
    }

}

/* Tablet Responsive */
@media (min-width: 768px) {
    .skeleton-hero {
        min-height: 40vh;
        z-index: -1;
        background: var(--skeleton-green);
    }

    .skeleton-form {
        min-height: 70vh;
        padding: 50px 40px;
    }

    .hero-section {
        background-image: url(../img/barista-image-mobile.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        min-height: 45vh;
    }

    .content {
        width: 55vw;
    }

    h1 {
        font-size: 2.3em;
        line-height: 1.2em;
    }

    .subtitle {
        font-size: 1.1em;
    }


    .disclaimer {
        font-size: 0.9em;
        line-height: 1.7em;
    }

    .footer-content {
        width: 55vw;
        padding: 20px;
    }

    .footer-divider {
        width: 55vw;
    }
}

/* Desktop Responsive - DYNAMIC VERSION */
@media (min-width: 1024px) {
    html {
        height: 100%;
    }
    
    body {
        height: 100%;
        overflow: auto;
    }

    .main-container {
        display: flex;
        flex-direction: column;
    }

    .main-container.show {
        display: flex !important;
    }

    /* Skeleton for desktop */
    .skeleton-container {
        display: flex;
        background: transparent;
    }

    .skeleton-content {
        display: flex;
        width: 100%;
    }

    .skeleton-hero {
        width: calc(50% + 64px);
        height: 100%;
        min-height: 100%;
        background: var(--skeleton-green);
        position: relative;
        overflow: hidden;
        margin-right: -64px;
    }

    .skeleton-form {
        width: 50%;
        height: 100%;
        min-height: 100%;
        margin-top: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 48px 48px 48px 112px;
        max-width: none;
        background: var(--background-white);
        border-top-left-radius: 64px;
        position: relative;
        z-index: 1;
    }

    /* Main layout container */

    .hero-section {
        background-image: url(../img/barista-image-long.jpg);
    }

    /* For Closed and Offnet Page */
    .content-section.alt-page {
        display: flex;
        flex: 1;
    }

    .content-layout {
        display: grid;
        grid-template-columns: calc(50% + 64px) 1fr;
        grid-template-rows: 80% auto;
        height: 100%;
        position: relative;
    }

    /* Content Section */
    .content-section {
        margin-left: -64px;    
    }

    .content-wrapper {
        margin-top: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        border-top-left-radius: 64px;
        height: 100%;
    }

    .content {
        display: flex;
        justify-content: center;
        width: 55vw;
        padding: 0 0 32px 0;
    }

    .form-container {
        width: 50%;
        max-width: 70%;
        margin-top: 115px;
    }

    .form-container-header {
        min-height: 6vh;
    }

    h1 {
        font-size: 1.6em;
        line-height: 1.3em;
    }

    .subtitle {
        font-size: 0.8em;
        line-height: 1.4em;
        margin-bottom: 24px;
    }
    
    .form-input {
        font-size: 0.8em !important;
        padding-left: 0.8em;
        height: 44px;
        line-height: 44px;
        border-radius: 12px;
    }

    .floating-label {
        left: 0.8em !important;
        font-size: 0.9em;
    }


    .form-input:focus ~ .floating-label,
    .form-input:not(:placeholder-shown) ~ .floating-label {
        top: 0;
        transform: translate(-15%, 5%) scale(0.7);
        color: var(--starbucks-green-light);
    }

    .error-icon {
        width: 10px;
    }

    .error-message {
        padding-left: 1.2em;
        font-size: 0.6em;
        gap: 5px;
    }

    .disclaimer {
        font-size: 0.7em;
        line-height: 1.5em;
    }

    .btn-connect {
        height: 44px;
        font-size: 0.8em;
    }

    /* Footer */
    footer {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 0;
        width: 100%;
        z-index: 10;
        margin-top: auto;
        height: 25vh;
    }

    .footer-divider {
        width: 100%;
        margin: 1.2vh 0;
    }

    .footer-content {
        max-width: 100%;
        max-height: 20vh;
        padding: 0 24px;
        margin: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
        justify-content: flex-start;
        padding-bottom: 0;
        padding-top: 10px;
    }

    .footer-links a {
        padding: 4px 0;
        font-size: 0.8em;
        display: inline-block;
    }
}

/* Windows Desktop*/
@media (min-width: 1024px) and (max-height: 700px) {
    .content {
        height: fit-content;
        overflow-y: auto;
    }

    .form-container {
        margin-top: 32px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    h1 {
        font-size: 1.8em;
        line-height: 1.2em;
    }

    .subtitle {
        font-size: 0.9em;
        line-height: 1.3em;
        padding-top: 1.5vh;
    }

    .form-input {
        height: 38px;
        border-radius: 12px;
    }

    .form-container-header {
        height: 10vh;
    }


    .content {
        width: 50vw
    }

    .disclaimer {
        font-size: 0.8em;
    }

    .footer-content {
        height: 25vh;
    }

    .footer-links a {
        font-size: 0.8em;
        margin-bottom: 10px;
    }

    .footer-links {
        margin-bottom: 0;
    }

    .copyright {
        font-size: 0.8em;
        margin: 0
    }
}

/* Mac CNA specific*/
@media screen and (max-width: 920px) and (min-height: 500px) {

    body.is-cna .skeleton-content {
        display: flex;
        width: 100%;
        height: 100vh;
    }

    body.is-cna .skeleton-hero {
        min-height: 100vh;
        background: var(--skeleton-green);
        position: relative;
        overflow: hidden;
        z-index: -44;
    }

    body.is-cna .skeleton-form {
        width: calc(70% + 64px);
        min-height: 100vh;
        margin-top: 0;
        margin-left: -8vw;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10vw;
        border-top-left-radius: 64px;
        z-index: 1;
    }

    body.is-cna .hero-section {
        background-image: url(../img/barista-image-long.jpg);
    }

    body.is-cna .content-section {
        position: relative;
        width: calc(100% + 64px);
        margin-left: -64px;
    }

    body.is-cna .content-layout {
        display: grid;
        grid-template-columns: calc(50% + 64px) 1fr;
        grid-template-rows: auto auto;
        position: relative;
    }

    body.is-cna .content-wrapper {
        border-top-left-radius: 64px;
        position: relative;
        align-items: center;
        margin-top: 0;
        padding: 32px 0;
    }

    body.is-cna .content {
        width: 35vw;
    }

    body.is-cna .form-container-header {
        height: 60px;
    }

    body.is-cna h1 {
        font-size: 1.3em;
        line-height: 1.3em;
    }

    body.is-cna .subtitle {
        font-size: 0.75em;
        line-height: 1.4em;
        margin: 0 0 16px 0;
    }

    body.is-cna .form-input {
        height: 42px;
        line-height: 42px;
        border-radius: 10px;
        font-size: 0.7em;
    }

    body.is-cna .form-group {
        margin-bottom: 32px;
    }

    body.is-cna .error-message {
        gap: 4px;
        height: 32px;
        font-size: 0.6em;
        padding-left: 1.2em;
    }

    body.is-cna .floating-label {
        font-size: 0.7em;
    }

    body.is-cna .form-input:focus ~ .floating-label,
    body.is-cna .form-input:not(:placeholder-shown) ~ .floating-label {
        transform: translate(-10%, 0) scale(0.8);
    }

    body.is-cna .form-input.error {
        border: 1px solid #b23527;
    }

    body.is-cna .error-icon {
        width: 9px;
    }

    body.is-cna .disclaimer {
        font-size: 0.6em;
        line-height: 1.3em;
    }

    body.is-cna .btn-connect {
        height: 42px;
        font-size: 0.7em;
        width: 100%;
    }

    body.is-cna footer {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    body.is-cna .footer-divider {
        width: 100%;
    }

    body.is-cna .footer-content {
        width: 100%;
    }

    body.is-cna .footer-links a {
        font-size: 0.6em;
        line-height: 1em;
    }

    body.is-cna .copyright {
        font-size: 9px;
    }
}

/* iPad CNA specific */
@media screen and (max-width: 820px) and (min-height: 900px) {

    body.is-cna .main-container {
        height: 100%;
    }

    body.is-cna .content-layout {
        height: 100%;
    }

    body.is-cna .content-section {
        height: 100%;
    }
    body.is-cna .content-wrapper {
        height: 100%;
        padding: 0;
    }

    body.is-cna .hero-section {
        height: 100%;
    }

    body.is-cna .content {
        padding: 0 20px;
        height: fit-content;
        width: 40vw;
        margin: 115px 0;
    }

    body.is-cna .form-container-header {
        height: 6vh;
        align-items: normal;
    }

    body.is-cna h1 {
        font-size: 1.5em;
        line-height: 1.2em;
    }

    body.is-cna  .subtitle {
        font-size: 0.8em;
        margin-bottom: 16px;
    }

    body.is-cna .form-input {
        font-size: 0.8em !important;
        padding-left: 0.8em;
    }

    body.is-cna  .error-message {
        height: 32px;
    }

    body.is-cna .form-input:focus ~ .floating-label,
    body.is-cna .form-input:not(:placeholder-shown) ~ .floating-label {
        transform: translate(-10%, 0) scale(0.8);
    }

    body.is-cna .error-icon {
        width: 10px;
    }

    body.is-cna .checkbox-label {
        font-size: 1em;
    }

    body.is-cna #connect-without-text {
        line-height: 1.5em;
        font-size: 0.75em;
    }

    body.is-cna #connect-without-title {
        font-size: 1em;
        margin-bottom: 16px;
    }
    
    body.is-cna .optin-text {
        font-size: 0.75em;
        line-height: 1.5em;
    }

    body.is-cna .btn-connect {
        height: 44px;
        font-size: 0.8em;
        width: 100%;
        margin: 24px 0;
    }


    body.is-cna footer {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
        padding: 0;
    }

    body.is-cna .footer-content {
        padding: 0 3vw;
    }

    body.is-cna .footer-links a {
        font-size: 0.75em;
        padding: 15px;
    }

    body.is-cna .copyright {
        font-size: 0.7em;
        padding: 15px;
        margin: 0;
    }
}