/* style.css - Professional & Responsive Canada Visa Portal Theme */

/* --- 1. Global & Typography --- */
:root {
    --primary-color: #00457C; /* Deep Corporate Blue */
    --secondary-color: #008CBA; /* Lighter Blue */
    --accent-color: #F8B400; /* Amber/Yellow for highlights */
    --text-color: #343A40;
    --background-color: #F8F9FA;
    --card-bg: #fff;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    margin: 5;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    padding-top: 60px; /* Space for fixed header */
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid #E6F2F9;
    margin-bottom: 20px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 2. Header & Navigation (New Fixed Header) --- */
header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 5;
    font-size: 1.5em;
    color: #fff;
    border-bottom: none;
}

header nav a {
    color: #fff;
    margin-left: 15px;
	margin-right: 20px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* --- 3. Form Container & Inputs --- */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #E6F2F9;
}

.form-container input:not([type="checkbox"]):not([type="radio"]),
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Important for width: 100% */
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary-color);
}

/* --- 4. Buttons (BTN) --- */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, opacity 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: #003660; /* Darker primary */
    text-decoration: none;
}

.btn-secondary {
    background-color: #ccc;
    color: var(--text-color);
}
.btn-secondary:hover {
    background-color: #bbb;
    text-decoration: none;
}

/* --- 5. Table Styling (Responsive) --- */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #E6F2F9;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap; /* Prevent headers from wrapping */
}

table tr:hover {
    background-color: #F0F5F8;
}

/* --- 6. Card & Job List Styling --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card, .job-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.3s;
}

.card:hover, .job-card:hover {
    transform: translateY(-3px);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
    color: white;
    font-size: 0.9em;
    display: inline-block;
}
.status-Approved { background-color: #28A745; }
.status-Rejected { background-color: #DC3545; }
.status-Processing { background-color: #008CBA; }
.status-Documents_Requested { background-color: var(--accent-color); }
.status-Submitted { background-color: #6C757D; }

/* --- 7. Hero Section (For index.php) --- */
.hero {
    text-align: center;
    padding: 150px 20px;
    background: linear-gradient(rgba(0,69,124,0.8), rgba(0,69,124,0.8)), url('images/canada_bg.jpg') no-repeat center center/cover;
    color: white;
    border-radius: 10px;
    margin-top: 20px;
}
.hero h1 { 
    font-size: 3em; 
    margin-bottom: 20px;
    color: #fff;
    border-bottom: none;
}
.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}
.hero .btn-group a { 
    margin: 10px; 
    font-size: 1.1em; 
}
.hero footer {
    margin-top: 50px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}


/* --- 8. Photo/Signature (apply_form.php) --- */
.camera-feed-container {
    position: relative;
    width: 300px;
    height: 225px;
    margin: 15px auto;
    border: 3px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.camera-feed-container video, 
.camera-feed-container canvas#photoCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.face-scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
}

.face-shape {
    width: 150px;
    height: 190px;
    border: 3px solid #00ff00; /* Neon Green */
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
    animation: pulseBorder 1.5s infinite alternate;
}

.face-shape::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #00ff00, transparent);
    animation: scanLineVertical 2s infinite ease-in-out; 
}

.scan-text-area {
    position: absolute;
    bottom: 10px; 
    width: 100%;
    text-align: center;
}

#scanText {
    color: white;
    font-size: 1.1em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

#signatureCanvas {
    border: 1px solid #ddd;
    touch-action: none; /* Prevents scrolling on touch devices while drawing */
}

/* --- Keyframe Animations --- */

@keyframes pulseBorder {
    0% { border-color: #00ff00; box-shadow: 0 0 10px rgba(0, 255, 0, 0.7); }
    100% { border-color: #00cc00; box-shadow: 0 0 30px rgba(0, 255, 0, 1); }
}

@keyframes scanLineVertical {
    0% { transform: translateY(0); }
    50% { transform: translateY(187px); } /* Face shape height - line height */
    100% { transform: translateY(0); }
}

/* --- 9. Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        padding-top: 50px;
    }
    
    header {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    header h1 {
        margin-bottom: 5px;
    }
    header nav {
        width: 100%;
        margin-top: 5px;
    }
    header nav a {
        margin: 5px 10px 5px 0;
        display: inline-block;
    }
    
    .hero {
        padding: 80px 15px;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero .btn-group a {
        display: block;
        margin: 10px 0;
    }
    
    table thead {
        display: none; /* Hide header on small screens */
    }
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    table tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    table td {
        text-align: right;
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid #eee;
    }
    /* Add labels to table cells on mobile */
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 15px;
        font-weight: bold;
        color: var(--primary-color);
        text-align: left;
    }
}