/* TRN-Plett Theme - Colors extracted from TRN-Plett.png */
:root {
    --primary-blue: #0A6BF5;
    --primary-blue-dark: #0854C4;
    --navy-blue: #0A174C;
    --navy-blue-light: #0B184D;
    --tcs-black: #0A174C;
    --tcs-gray: #333333;
    --tcs-light-gray: #F5F5F5;
    --tcs-white: #FFFFFF;
    --success-green: #28a745;
    /* Legacy variable names for compatibility */
    --tcs-red: #0A6BF5;
    --tcs-red-dark: #0854C4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--tcs-light-gray) 0%, #E8E8E8 100%);
    min-height: 100vh;
    color: var(--tcs-gray);
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--tcs-white);
    border-radius: 10px 10px 0 0;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    text-align: center;
    background: var(--tcs-white);
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.banner {
    background: var(--primary-blue);
    color: var(--tcs-white);
    padding: 12px 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.banner p {
    margin: 0;
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
    background: var(--tcs-white);
    padding: 15px;
    border-radius: 5px;
}

.logo {
    height: 100px;
    width: auto;
    max-width: 400px;
}

/* Form Container */
.form-container {
    background: var(--tcs-white);
    padding: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
}

h1 {
    color: var(--navy-blue);
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--tcs-gray);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Form Styles */
#wifiForm {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--navy-blue);
    font-size: 14px;
}

.required {
    color: var(--primary-blue);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #DDD;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: var(--tcs-white);
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(10, 107, 245, 0.1);
}

input[type="text"]:invalid:not(:placeholder-shown),
input[type="email"]:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

input[type="text"]:valid:not(:placeholder-shown),
input[type="email"]:valid:not(:placeholder-shown) {
    border-color: var(--success-green);
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* Checkbox */
.checkbox-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-label a:hover {
    color: var(--primary-blue-dark);
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--primary-blue);
    color: var(--tcs-white);
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--tcs-gray);
    font-size: 12px;
}

.logo-container-footer {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 0;
    padding: 15px 0;
}

.logo-footer {
    height: 80px;
    width: auto;
    max-width: 300px;
}

.footer .version-code {
    margin-top: 8px;
    font-size: 11px;
    font-family: monospace;
    opacity: 0.8;
}

/* Terms Page */
.terms-container {
    background: var(--tcs-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.terms-content {
    margin-bottom: 30px;
}

.terms-content h1 {
    color: var(--primary-blue);
    font-size: 24px;
    margin-bottom: 20px;
    text-align: left;
}

.terms-content h2 {
    color: var(--navy-blue);
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.terms-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.terms-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.terms-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.terms-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--tcs-light-gray);
}

/* Success Page */
.success-container {
    background: var(--tcs-white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 20px;
}

.success-icon {
    margin-bottom: 20px;
}

.success-container h1 {
    color: var(--success-green);
    margin-bottom: 15px;
}

.success-message {
    font-size: 16px;
    color: var(--tcs-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.redirect-message {
    font-size: 14px;
    color: var(--tcs-gray);
    margin-bottom: 25px;
}

.redirect-message span {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 0;
    }

    .banner-img {
        max-height: 150px;
    }

    .logo-footer {
        height: 60px;
        max-width: 250px;
    }

    .banner {
        font-size: 12px;
        padding: 10px 12px;
    }

    .form-container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    input[type="text"],
    input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-primary {
        font-size: 16px;
        padding: 14px;
    }

    .terms-container {
        padding: 20px;
    }

    .terms-content h1 {
        font-size: 20px;
    }

    .terms-content h2 {
        font-size: 16px;
    }

    .success-container {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .banner-img {
        max-height: 120px;
    }

    .logo-footer {
        height: 50px;
        max-width: 200px;
    }

    .banner {
        font-size: 11px;
        padding: 8px 10px;
    }

    .form-container {
        padding: 15px;
    }

    h1 {
        font-size: 22px;
    }

    .checkbox-label {
        font-size: 14px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--tcs-white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



