/*
Script Name - check-in.css
Author - Richard

Purpose -
Styles the AIT Game Check-In page

Responsibilities -
1) Define page layout and theme
2) Style the open and closed check-in views
3) Style consent area, form fields, and buttons
4) Highlight invalid fields and checkbox errors
5) Support mobile-friendly layout adjustments

Accompanying files
- HTML file - check-in.html
- JS file - check-in.js

Active AWS backend
- AWS API Gateway - AIT-CheckIn-API
- AWS Lambda - AIT-CheckIn-Player-Lambda
- DynamoDB table - AIT-CheckIns-DB
*/

body {
    background-color: #0f1a0f;
    color: #e6e6e6;
    font-family: Arial, sans-serif;
    padding: 20px;
    max-width: 700px;
    margin: auto;
}

/* ===== VIEW DISPLAY ===== */
.is-hidden {
    display: none;
}

/* ===== PAGE TITLE ===== */
.page-title {
    text-align: center;
    margin-bottom: 20px;
}

/* ===== CLOSED CHECK-IN VIEW ===== */
#closed-view {
    text-align: center;
}

.closed-image {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 0 auto 20px;
}

.closed-message {
    border: 2px solid #3a5f3a;
    background-color: #1a2b1a;
    padding: 22px 20px;
}

.closed-message h2 {
    margin: 0 0 18px;
}

.closed-message p {
    margin: 12px 0;
}

.next-game-date {
    color: #9fb8e8;
    font-size: 1.35rem;
    font-weight: bold;
}

/* ===== CONSENT TEXT AREA ===== */
#consent-container {
    border: 2px solid #3a5f3a;
    padding: 10px;
    height: 350px;
    overflow-y: scroll;
    background-color: #1a2b1a;
    margin-bottom: 20px;
}

/* ===== PDF DOWNLOAD BUTTON AREA ===== */
#download-link-container {
    text-align: right;
    margin-bottom: 20px;
}

#downloadConsentPDF {
    background-color: #3a5f3a;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}

/* ===== FORM FIELDS ===== */
.input-label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}

.input-field {
    width: 100%;
    padding: 10px;
    background-color: #1a2b1a;
    border: 1px solid #3a5f3a;
    color: #e6e6e6;
    font-size: 16px;
}

/* Invalid text/email field styling */
.input-error {
    border: 2px solid #ff4d4d !important;
    background-color: #2a0f0f !important;
}

/* ===== CONSENT CHECKBOX ===== */
#checkbox-container {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
}

#agreeCheckbox {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

/* Invalid checkbox styling */
.checkbox-error {
    outline: 2px solid #ff4d4d;
    outline-offset: 4px;
}

/* ===== SUBMIT BUTTON ===== */
#submitButton {
    margin-top: 25px;
    width: 100%;
    padding: 14px;
    background-color: #3a5f3a;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 600px) {
    body {
        padding: 10px;
        font-size: 18px;
    }

    #consent-container {
        height: 55vh;
    }

    #agreeLabel {
        font-size: 16px;
    }

    #submitButton {
        padding: 18px;
        font-size: 20px;
    }
}
