/* Tourism Housing Assistance & Recovery Programme - Status Check Styles */

/* Variables */
:root {
    --primary-dark: #111827;
    --primary-blue: #4C96BD;
    --primary-blue-light: #A1D1E4;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-500: #ef4444;
    --red-50: #fef2f2;
    --green-500: #22c55e;
    --green-50: #f0fdf4;
    --blue-500: #3b82f6;
    --blue-50: #eff6ff;
    --yellow-500: #eab308;
    --yellow-50: #fefce8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.main-header {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    object-fit: contain;
    padding: 0px;
}

.header-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-text p {
    font-size: 0.875rem;
    opacity: 0.8;
}

@media (min-width: 640px) {
    .header-text h1 {
        font-size: 1.5rem;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
}

/* Section: Status Check */
.section-status {
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    padding: 2rem 0;
}

/* GPS trigger in status section */

/* Cards */
.intro-card,
.form-card,
.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.intro-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.intro-card p {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(76, 150, 189, 0.2);
}

.form-group input:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 0.375rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.required {
    color: var(--red-500);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background-color: #3d7a9a;
}

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

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Alerts */
.alert {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-warning {
    background-color: var(--yellow-50);
    border: 1px solid var(--yellow-500);
}

.alert-warning .alert-icon svg {
    width: 24px;
    height: 24px;
    color: var(--yellow-500);
    flex-shrink: 0;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
}

.alert-info .alert-icon svg {
    width: 24px;
    height: 24px;
    color: #3b82f6;
    flex-shrink: 0;
}

.alert-info a {
    color: #2563eb;
}

.alert-content strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.alert-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

/* Result Card */
.result-card {
    text-align: center;
}

.result-card > .btn-secondary {
    margin-top: 1.5rem;
}

.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.result-header svg {
    width: 48px;
    height: 48px;
}

.result-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.result-success svg {
    color: var(--green-500);
}

.result-success h3 {
    color: var(--green-500);
}

.result-warning svg {
    color: var(--yellow-500);
}

.result-warning h3 {
    color: var(--gray-800);
}

.result-error svg {
    color: var(--red-500);
}

.result-error h3 {
    color: var(--red-500);
}

.result-body {
    text-align: left;
    margin-bottom: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.result-value {
    font-weight: 500;
    color: var(--gray-900);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-pending {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

.status-badge.status-qualified,
.status-badge.status-verified {
    background-color: var(--blue-50);
    color: var(--blue-500);
}

.status-badge.status-approved,
.status-badge.status-assigned {
    background-color: var(--green-50);
    color: var(--green-500);
}

.status-badge.status-rejected {
    background-color: var(--red-50);
    color: var(--red-500);
}

/* Notice */
.notice {
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.notice-info {
    background-color: var(--blue-50);
    color: var(--blue-500);
    border: 1px solid var(--blue-500);
}

/* Contact Info */
.contact-info {
    margin-top: 1rem;
    text-align: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

.contact-link svg {
    width: 20px;
    height: 20px;
}

.contact-link:hover {
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1rem 0;
}

/* CAPTCHA Container */
#captchaContainer {
    display: flex;
    justify-content: center;
}

/* Footer */
.main-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.875rem;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--primary-blue-light);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--gray-400);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--white);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-700);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

/* GPS Trigger */
.gps-trigger-wrapper {
    text-align: center;
    margin-bottom: 1rem;
}

.gps-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.gps-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.gps-trigger svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* GPS Modal */
.gps-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.gps-modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gps-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.25s ease;
    overflow: hidden;
}

.gps-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.gps-modal-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gps-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.gps-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--gray-400);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.gps-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.gps-modal-close svg {
    width: 18px;
    height: 18px;
}

.gps-modal-body {
    padding: 1.25rem;
    text-align: center;
}

.gps-icon-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue), #3d7a9a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gps-icon-circle svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

.gps-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.gps-warning {
    color: var(--red-500);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.gps-form {
    text-align: left;
}

.gps-form .form-group input {
    text-align: center;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    letter-spacing: 0.1em;
}

.btn-gps {
    background: linear-gradient(135deg, var(--primary-blue), #3d7a9a);
    color: var(--white);
}

.btn-gps:hover:not(:disabled) {
    background: linear-gradient(135deg, #3d7a9a, var(--primary-dark));
}

.btn-gps:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gps-status {
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    line-height: 1.5;
}

.gps-status.gps-error {
    background-color: var(--red-50);
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.gps-status.gps-success {
    background-color: var(--green-50);
    color: #15803d;
    border: 1px solid #86efac;
}

.gps-status .gps-coords {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    opacity: 0.85;
}

.gps-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gps-copy-btn:hover {
    background-color: #bbf7d0;
}

.gps-copy-btn svg {
    width: 12px;
    height: 12px;
}

/* Error State */
.form-group.has-error input {
    border-color: var(--red-500);
}

.form-group .error-message {
    color: var(--red-500);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}
