﻿/* Base reset and general layout */
body {
    font-family: Arial, Verdana, Helvetica, sans-serif, "Segoe UI";
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

/* Responsive padding for tablets and up */
@media screen and (min-width: 600px) {
    .body-content {
        padding: 0;
    }
}

.page-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Utility and layout classes --- */
.uppercase {
    text-transform: uppercase;
}

.nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.center-text {
    text-align: center;
}

.highlight {
    color: red;
    font-size: 1.3em;
}

/* --- Draft watermark --- */
.draft-label {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: clamp(2rem, 10vw, 7rem);
    font-weight: 600;
    z-index: 1000;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    text-align: center;
    letter-spacing: 0.1em;
}

/* --- Theme selector --- */
.theme-selector {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.rbl-theme {
    display: inline-block;
    text-align: left;
}

    .rbl-theme td {
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

        .rbl-theme td:hover {
            background-color: rgba(255, 0, 0, 0.08);
        }

/* --- Status and message styles --- */
.ErrorControl {
    background-image: url('/Images/yellowflag.gif');
    background-repeat: no-repeat;
    background-position: right;
}

.pleasepickanswer {
    text-align: center;
    font-size: x-large;
    color: black;
    font-weight: bold;
    background-color: yellow;
    vertical-align: middle;
}

.wrongtryagain {
    text-align: center;
    font-size: x-large;
    color: white;
    font-weight: bold;
    background-color: red;
    vertical-align: middle;
    border-spacing: 10px;
}

.input-error {
    background-color: #ffe6e6;
    border: 1px solid red;
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    text-align: left;
    margin: 8px 0;
    font-size: 18px; /* prevents iPhone zoom-in */
    line-height: 1.4;
    border-radius: 8px;
}

/* --- Message animation --- */
.messageLabel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in, visibility 0s linear 1s;
    display: inline-block;
    background: linear-gradient(to right, #b2f7b2, #66cc66);
    color: black;
    border: 2px solid darkgreen;
    border-radius: 8px;
    padding: 6px;
    margin-top: 10px;
}

    .messageLabel.visible {
        opacity: 1;
        visibility: visible;
        transition: opacity 1s ease-out;
    }

    .messageLabel.fading {
        opacity: 0;
        visibility: hidden;
        transition: opacity 2.5s ease-in, visibility 0s linear 2.5s;
    }

/* --- Radio and checkbox --- */
.radioListContainer {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 10px;
    margin-top: 10px;
}

    .radioListContainer.visible {
        opacity: 1;
        visibility: visible;
    }

.big-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    transform: scale(1.5);
    margin: 0 18px;
}

/* --- Custom Button Styles --- */

/* Blue (Primary) Button */
.btn-blue {
    background-color: blue;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .btn-blue:hover {
        background-color: #004bb5;
    }

/* Light Red (Scary) Button */
.btn-red {
    background-color: #e60000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .btn-red:hover {
        background-color: #ff3333;
    }


/* Light Green Button */
.btn-green {
    background-color: #2eb82e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .btn-green:hover {
        background-color: #5cd65c;
    }


/* Light Gray (Secondary) Button */
.btn-gray {
    background-color: #f0f0f0;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-gray:hover {
    background-color: #d9d9d9;
}

/* --- Password field toggle --- */
.password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
}

.toggle-eye {
    cursor: pointer;
    font-size: 18px;
    background: none;
    border: none;
    padding: 4px;
    margin-left: 1px;
}

.validator-float {
    position: absolute;
    color: red;
    font-size: 0.9em;
    margin-top: -20px;
}

/* --- Loading overlay --- */
#loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
    color: #003366;
    font-weight: bold;
}

    #loading img {
        width: 72px;
        height: 72px;
        display: block;
        margin: 0 auto 10px auto;
    }

/* --- Forms (Unified + Responsive) --- */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    text-align: left;
    margin: 8px 0;
    font-size: 18px; /* prevents iPhone zoom-in */
    line-height: 1.4;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}


    input[type="date"].input-error {
        border: 2px solid red !important;
        background-color: #ffe6e6 !important;
        color: #000; /* fallback */
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: #0b66ff;
        box-shadow: 0 0 4px rgba(11, 102, 255, 0.3);
        outline: none;
    }

/* --- Form container layout --- */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-actions {
    margin-top: 1.5rem;
}

/* --- Mobile adjustments (iPhones & small screens) --- */
@media (max-width: 480px) {
    .form-container {
        padding: 1rem 0.5rem; /* tighter padding to allow full width fields */
    }

    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        width: 96vw; /* take almost full viewport width */
        max-width: none; /* remove the desktop limit */
        font-size: 20px; /* easier typing */
        padding: 16px 18px; /* taller and more touch-friendly */
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    @media (max-width: 600px) {
        div.inline-badge {
            font-size: 0.9em;
            padding: 4px 8px;
        }
    }

    button,
    input[type="submit"] {
        width: 96vw; /* match the input width */
        margin-left: auto;
        margin-right: auto;
        display: block;
    }


    #RepeaterRecent table th,
    #RepeaterRecent table td {
        text-align: center;
        vertical-align: middle; /* optional: centers vertically */
    }
}
