/* Importing a modern font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;700&display=swap');

/* Include Legothick font */
@font-face {
    font-family: 'Legothick';
    src: url('/static/fonts/Legothick.ttf') format('truetype');
}

/* Screen-reader-only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Honeypot field styling */
.honeypot {
    display: none;
}

/* Textarea styling */
.textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.9375rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
}

/* Back link styling */
.back-link {
    display: block;
    margin-top: 0.625rem;
    color: #007bff;
    text-decoration: underline;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

/* Mobile-first base styles */
body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(to right, #007bff, #ffcc00);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    background-color: white;
    padding: 0.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /*width: 100%;*/
    max-width: 900px;
    text-align: center;
    border: 3px solid #ffcc00;
    overflow-x: auto;
    box-sizing: border-box;
}

header {
    margin-bottom: 1.25rem;
}

header h1 {
    margin: 0;
    color: #007bff;
    font-family: 'Legothick', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 2rem);
}

header h2 {
    margin: 0.5rem 0;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    color: #333;
}

header h3 {
    margin: 0.5rem 0;
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: #666;
}

.intro {
    margin: 0.625rem 0 1.25rem;
    color: #666;
    font-size: clamp(1rem, 4vw, 1.2rem);
    line-height: 1.5;
    word-wrap: break-word;
}

form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

label {
    margin-bottom: 0.3125rem;
    color: #333;
    font-weight: 700;
    text-align: left;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.9375rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    box-sizing: border-box;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container input {
    margin-right: 0.625rem;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.625rem 0;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    max-width: 200px;
    margin: auto;
}

button:hover {
    background-color: #005bb5;
}

.g-recaptcha {
    margin-bottom: 1.25rem;
}

/* Flash message styles */
.flashes {
    margin: 1.25rem 0;
}

.flash {
    padding: 0.625rem;
    border-radius: 5px;
    margin-bottom: 0.625rem;
}

.flash-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.flash-danger {
    background-color: #f2dede;
    color: #a94442;
}

/* Table styles */
.table-wrapper {
    overflow-x: auto;
    margin: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 0.5rem;
    text-align: left;
    font-size: clamp(0.875rem, 3vw, 1rem);
    /*min-width: 100px;*/
}

th {
    background-color: #f2f2f2;
}

td button {
    padding: 0.3125rem 0.625rem;
    font-size: 0.9rem;
    width: auto;
    max-width: none;
}

/* Payment form in table */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-form input {
    width: 100%;
    max-width: 150px;
}

.payment-form button {
    width: auto;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0;
    align-items: center;
}

/* Payment button styles */
.payment-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9375rem 1.875rem;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    transition: background-color 0.3s ease;
    width: 75%;
    max-width: 400px;
}

.btn i {
    font-size: 1.5rem;
    margin-right: 0.625rem;
}

.paypal-btn {
    background-color: #003087;
}

.paypal-btn:hover {
    background-color: #001f5b;
}

.venmo-btn {
    background-color: #3D95CE;
}

.venmo-btn:hover {
    background-color: #276b93;
}

.cashapp-btn {
    background-color: #00C244;
}

.cashapp-btn:hover {
    background-color: #009431;
}

/* User info styles */
.user-info {
    text-align: left;
}

.user-info h2 {
    margin-top: 0;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.user-info table {
    width: 100%;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
}

.user-info table, .user-info th, .user-info td {
    border: 1px solid #ddd;
}

.user-info th, .user-info td {
    padding: 0.5rem;
    text-align: left;
    font-size: clamp(0.875rem, 3vw, 1rem);
}

.user-info th {
    background-color: #f2f2f2;
}

/* Current/not-current cell styles */
.current {
    background-color: green;
    color: white;
}

.not-current {
    background-color: red;
    color: white;
}

/* Responsive design: Tablet and up (768px+) */
@media (min-width: 768px) {
    body {
        padding: 2rem;
    }
    .container {
        padding: 2rem;
    }
    header h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
    button {
        width: auto;
    }
    .filters {
        flex-direction: row;
        gap: 1.5rem;
    }
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .payment-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .btn {
        width: auto;
        max-width: 300px;
    }
    .back-link {
        display: inline-block;
        margin-top: 0;
        margin-left: 1rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .container {
        padding: 2.5rem;
    }
    form {
        max-width: 600px;
        margin: 0 auto;
    }
    .payment-buttons {
        gap: 2rem;
    }
}