/* =========================================
   CONTACT PAGE STYLES
   Matches login4.css design system
   ========================================= */

.bg-contact {
    background: url(../images/bg-contact.webp) top;
    padding-top: 30px;
    padding-bottom: 60px;
    background-size: cover;
    background-position-x: left;
}

.contact-box {
    margin: auto;
    width: 580px;
}

/* Heading & Subtext */
body.contact #main h1 {
    text-align: center;
}

body.contact #main p.contact-subtitle {
    text-align: center;
    color: #FFF;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* Disclaimer box */
.contact-disclaimer {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-family: "CircularXXWeb-Book", sans-serif;
}

/* Form Container */
body.contact .form-container {
    background: #FFF;
    box-shadow: 0 0 3px 1px rgba(0,0,0,.05), 0 1px 2px 0px rgba(0,0,0,.1);
    border: 1px #CFCFCF solid;
    border-radius: 10px;
    width: 100%;
    padding: 25px 0;
}

body.contact .form-inner {
    margin: auto;
    width: 480px;
}

/* Labels */
body.contact .form-container label {
    display: block;
    font-size: 1rem;
    font-family: "CircularXXWeb-Medium", sans-serif;
    font-weight: normal;
    padding: 5px 0px 10px 13px;
}

/* Input Fields */
body.contact .form-container .controls input[type="text"],
body.contact .form-container .controls input[type="email"],
body.contact .form-container .controls textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    font-family: "CircularXXWeb-Book", sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

body.contact .form-container .controls input[type="text"]:focus,
body.contact .form-container .controls input[type="email"]:focus,
body.contact .form-container .controls textarea:focus {
    border-color: #222;
    box-shadow: 0 0 0 1px #222;
}

body.contact .form-container .controls input[readonly] {
    background-color: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

body.contact .form-container .controls textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.5;
}

/* Control Groups */
body.contact .control-group {
    width: 100%;
    margin-bottom: 5px;
}

/* Controls wrapper for flex validation */
body.contact .controls {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Submit Button */
.ui-button-contact {
    border: none;
    background: linear-gradient(to right, #E61E4D 0%, #E31C5F 50%, #D70466 100%);
    border-radius: 10px;
    display: block;
    vertical-align: middle;
    color: #fff !important;
    height: 48px;
    line-height: 1em;
    text-decoration: none;
    padding: 0 15px;
    text-transform: uppercase;
    font-family: "CircularXXWeb-Medium", sans-serif;
    font-size: 16px;
    width: 100%;
    position: relative;
    text-shadow: none;
    cursor: pointer;
    margin-top: 10px;
}

.ui-button-contact:hover {
    background: #F42156 !important;
}

/* Loading spinner */
.button--loading .button__text {
    visibility: hidden;
    opacity: 0;
}
.button--loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 4px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}
@keyframes button-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

/* Success sent state */
.contact-sent-box {
    text-align: center;
    padding: 30px 20px;
}
.contact-sent-box .sent-icon {
    font-size: 48px;
    margin-bottom: 15px;
}
.contact-sent-box h2 {
    font-family: "CircularXXWeb-Medium", sans-serif;
    font-size: 22px;
    margin-bottom: 10px;
}
.contact-sent-box p {
    font-family: "CircularXXWeb-Book", sans-serif;
    color: #666;
    font-size: 15px;
}

/* =========================================
   ERROR LIST (legacy OSClass)
   ========================================= */
body.contact #error_list {
    background: none;
    border: none;
    padding: 0px;
    margin: 0px;
}
body.contact #error_list li {
    list-style: none;
    padding: 0px;
}
body.contact #error_list li label {
    text-align: center;
    min-height: inherit;
    display: block !important;
}

/* =========================================
   VALIDATION - Error Below Input
   Matches login4.css pattern
   ========================================= */

/* Invalid input */
body.contact input.is-invalid,
body.contact textarea.is-invalid {
    border: 1px solid #c13515 !important;
    background-color: #fff8f6 !important;
    box-shadow: 0 0 0 1px #c13515 !important;
    margin-bottom: 0 !important;
    z-index: 1;
}

/* Error message below */
body.contact div.is-invalid {
    color: #c13515;
    font-size: 13px;
    font-family: "CircularXXWeb-Book", sans-serif;
    display: flex;
    align-items: center;
    width: 100%;
    line-height: 15px;
    margin-top: 6px !important;
    margin-bottom: 5px !important;
    order: 1;
}

/* Error icon (!) */
body.contact div.is-invalid::before {
    content: "!";
    display: inline-block;
    width: 12px;
    height: 12px;
    min-width: 12px;
    background: #c13515;
    color: white;
    text-align: center;
    line-height: 12px;
    border-radius: 50%;
    font-size: 8px;
    margin-right: 6px;
    font-weight: bold;
}

/* Server error (flash message highlight) */
body.contact input.server-error,
body.contact textarea.server-error {
    border: 1px solid #c13515 !important;
    background-color: #fff8f6 !important;
    box-shadow: 0 0 0 1px #c13515 !important;
}

/* =========================================
   FLASH MESSAGE (Server Errors)
   ========================================= */
body.contact .flashmessage {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    font-family: "CircularXXWeb-Medium", sans-serif;
    font-size: 14px !important;
    padding: 12px 40px 12px 15px !important;
    margin-bottom: 20px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    text-align: left !important;
    display: flex;
    align-items: center;
    position: relative;
}

body.contact .flashmessage-error {
    background-color: #fff8f6 !important;
    border: 1px solid #c13515 !important;
    color: #c13515 !important;
}

body.contact .flashmessage-error::before {
    content: "!";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: #c13515;
    color: white;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
}

body.contact .flashmessage-ok {
    background-color: #f0fdf4 !important;
    border: 1px solid #16a34a !important;
    color: #16a34a !important;
}

body.contact .flashmessage-ok::before {
    content: "✓";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: #16a34a;
    color: white;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
}

body.contact .flashmessage .ico-close {
    color: #c13515 !important;
    opacity: 0.6;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px !important;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    padding: 5px !important;
    cursor: pointer;
}

body.contact .flashmessage .ico-close:hover {
    opacity: 1;
}

/* =========================================
   MOBILE
   ========================================= */
@media only screen and (max-width: 500px) {
    .contact-box {
        margin: auto;
        display: block;
        width: 95%;
    }
    .bg-contact {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url(../images/bg-contact.webp) top left no-repeat !important;
        background-size: cover !important;
        background-position-x: -100px !important;
    }
}

@media only screen and (max-width: 768px) {
    body.contact .form-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 5% !important;
        box-sizing: border-box !important;
    }

    body.contact .form-container .controls input[type="text"],
    body.contact .form-container .controls input[type="email"] {
        font-size: 16px !important;
        height: 50px !important;
        padding: 0 15px !important;
        border-radius: 8px !important;
    }

    body.contact .form-container .controls textarea {
        font-size: 16px !important;
        padding: 12px 15px !important;
        border-radius: 8px !important;
    }

    .ui-button-contact {
        width: 100% !important;
        height: 50px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
