﻿/* ==========================================================================
   WEB FORMS CORE (v2)
   File:        /_includes/v2/webforms.core.css
   Load order:  FIRST of the three (before theme.css and page.css)
   Purpose:     Generic, application-level form styles (layout, labels,
                inputs, messages, social sharing). Themes may override
                anything here.

   CONTENTS
     1. Form container
     2. Header messages & page-state titles
     3. Layout: rows, containers, wrappers
     4. Labels (including dynamic labels)
     5. Inputs, selects, textareas
     6. Checkboxes & radios
     7. Footer / login buttons
     8. Products & tickets
     9. Additional contacts / "for me or someone else"
    10. One-click checkout & MFA
    11. Address autocomplete
    12. Social sharing widget
    13. Legacy ASP.NET wrapper
   ========================================================================== */


/* ==========================================================================
   1. FORM CONTAINER
   ========================================================================== */

form.ce-forms {
    min-width: min(400px, 100%);
    background-color: white;
}


/* ==========================================================================
   2. HEADER MESSAGES & PAGE-STATE TITLES
   ========================================================================== */

.ceFormHeaderMessagesContainers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
}

#headerDynamicMessageTitle,
#formLoginModalTopErrorMessage {
    font-weight: bold;
}

/* Error state */
form.ce-errorPageViews #headerDynamicMessageTitle,
.ceFormHeaderMessagesContainers.error #headerDynamicMessageTitle,
#formLoginModalTopErrorMessage {
    color: red;
}

.ceFormHeaderMessagesContainers.error #headerDynamicMessageContent {
    color: black;
}

/* Success state */
form.ce-successPageViews #headerDynamicMessageTitle {
    color: darkgreen;
}


/* ==========================================================================
   3. LAYOUT: ROWS, CONTAINERS, WRAPPERS
   ========================================================================== */

/* A <fieldset> will not get narrower than its content by default (min-width:
   min-content). One wide row would stretch the whole section past the form and
   push everything in it off-center, so let it shrink to the form's width. */
.ce-formSections {
    min-width: 0;
}

.ce-formRows {
    display: flex;
    gap: 22px 5px; /* row-gap column-gap */
}

.ce-formFieldContainers,
.ce-formLoginRow {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

.ce-formFieldWrappers,
.ce-formLoginFieldWrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Currency selector sits beside the amount field */
.ce-hasMultipleFormFields .ce-currencySelectorFormFieldContainers {
    max-width: 95px;
}


/* ==========================================================================
   4. LABELS
   ========================================================================== */

.ce-formFieldLabels {
    display: flex;
    color: #757575;
}

/* Dynamic (floating) labels: only when JS has initialized them */
.ce-dynamicLabelsInitialized .ce-formFieldContainers.ce-dynamicLabelContainers {
    position: relative;
}

    .ce-dynamicLabelsInitialized .ce-formFieldContainers.ce-dynamicLabelContainers > label.ce-formFieldLabels {
        z-index: 100;
        padding-left: 4px;
        padding-right: 4px;
    }

.ce-dynamicLabels {
    gap: 10px !important;
}

    .ce-dynamicLabels .ce-formFieldContainers {
        gap: 0 !important;
    }


/* ==========================================================================
   5. INPUTS, SELECTS, TEXTAREAS
   ========================================================================== */

/* 5.1 Default border */
input[type="text"],
input[type="password"],
select,
textarea,
.ce-googleMapsAutocomplete {
    border: 1px solid #c7c7c7;
}

/* 5.2 Default sizing (a template/theme may override) */
#formContainer input[type="text"],
#formContainer select,
#formLoginModal input[type="text"] {
    box-sizing: border-box;
    height: 40px;
    padding: 8px 12px 4px;
    font-size: 16px;
    line-height: 30px;
}

    #formContainer input[type="text"]:not(.ce-ticketQuantities):not(.ce-promoCodes):not(.ce-amountWithPlusMinusButtonInputs),
    #formContainer select:not(.ce-ticketQuantities):not(.ce-amountWithPlusMinusButtonInputs),
    #formContainer textarea {
        width: 100%;
    }

#formContainer textarea {
    min-height: 60px;
}

/* 5.3 Fixed-width fields */
input[type="text"].ce-ticketQuantities,
select.ce-ticketQuantities {
    width: 200px;
    max-width: 100%;
}

.ce-promoCodes {
    width: 200px;
    max-width: 100%;
}

/* 5.4 Validation error */
#formContainer input[type="text"].error,
#formContainer select.error,
#formLoginModal input[type="text"].error {
    border: 2px solid red;
}


/* ==========================================================================
   6. CHECKBOXES & RADIOS
   ========================================================================== */

#formContainer [type="checkbox"],
#formContainer [type="radio"] {
    width: 18px;
    height: 18px;
    font-size: 20px;
    transform: scale(1.2);
}

#formContainer .ce-checkBoxLists input[type="checkbox"] + label {
    margin-left: 5px;
}


/* ==========================================================================
   7. FOOTER / LOGIN BUTTONS
   ========================================================================== */

.ceFormFooterButtonContainers button,
.ce-formLoginFooter button {
    padding: 10px;
    font-size: 15px;
}


/* ==========================================================================
   8. PRODUCTS & TICKETS
   ========================================================================== */

.ce-formFieldRows.ce-products {
    gap: 10px;
}

.ce-products .ce-formFieldContainers {
    flex-grow: 0;
}

#formContainer .ce-products .ce-amountWithPlusMinusButtonInputContainers .ce-amountWithPlusMinusButtonInputs {
    width: 130px;
}


/* ==========================================================================
   9. ADDITIONAL CONTACTS / "FOR ME OR SOMEONE ELSE"
   ========================================================================== */

.forMeOrSomeoneElseContainers,
.forMeOrSomeoneElseContactInfoContainers {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.forMeOrSomeoneElseContainers {
    width: 100%;
    gap: 8px;
}

.additionalContactsContainers {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 4px;
}

    .additionalContactsContainers input[type="button"] {
        width: fit-content;
    }

.additionalContactsContactRowsContainers {
    display: flex;
    flex-direction: column;
    width: 100%;
    row-gap: 10px;
}

.additionalContactsContactRows {
    display: flex;
    flex-direction: row;
    gap: 4px;
}


/* ==========================================================================
   10. ONE-CLICK CHECKOUT & MFA
   ========================================================================== */

#oneClickCheckoutUseProfileButton {
    border: 1px solid gray;
    border-radius: 4px;
}

#oneClickCheckoutForgetButton {
    color: unset;
    text-decoration: none;
}

.enterMfaCodeContainers {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
}


/* ==========================================================================
   11. ADDRESS AUTOCOMPLETE (Google Places)
   ========================================================================== */

.ce-googleMapsAutocomplete {
    box-sizing: border-box;
    width: 100% !important;
    height: 38px;
    padding: 0;
    font-size: 16px;
    line-height: 30px;
}

gmp-place-autocomplete::part(focus-ring) {
    display: none;
}

#contactAddressSingleLineInput {
    width: 300px;
    max-width: 100%;
}


/* ==========================================================================
   12. SOCIAL SHARING WIDGET
   ========================================================================== */

#ceSocialSharingWidgetContainer {
    display: flex;
    flex-direction: row;
    width: 100%;
}

#ceSocialSharingWidget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

    #ceSocialSharingWidget > div {
        margin-right: 50px;
    }

#ceSocialSharingWidgetBtns {
    display: flex;
    width: 200px;
}

    #ceSocialSharingWidgetBtns > a {
        flex-grow: 1;
        color: black;
        font-size: 28px;
        text-align: center;
    }


/* ==========================================================================
   13. LEGACY ASP.NET WRAPPER
   ========================================================================== */

#aspnetForm {
    margin: 0 auto !important;
}
