/* Reset default styles for consistency */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global styles */
body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #e3f2fd; /* Light blue background */
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000; /* Increased z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.modal[style*="block"] {
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem; /* Increased padding for more fields */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal[style*="block"] .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #aaa;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
}

.modal-close-btn {
    background-color: #607d8b;
    margin-left: 1rem;
}

.modal-close-btn:hover {
    background-color: #455a64;
}

/* Input styles for date and number */
input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

input[type="number"] {
    -moz-appearance: textfield; /* Remove spinners in Firefox */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; /* Remove spinners in Chrome/Safari */
    margin: 0;
}

/* Header */
header {
    background: linear-gradient(rgba(21, 101, 192, 0.7), rgba(66, 165, 245, 0.7)), url('images/oldstore') center center/cover no-repeat;  /* Overlay gradient on image */
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-height: 150px; /* Ensure header has enough height to display the image */
    max-width: 1000px; /* Limit width to 1000px */
    margin: 0 auto; /* Center horizontally */
    width: 100%; /* Ensure it respects max-width */
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Stronger shadow for better readability */
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); /* Shadow for readability */
}

nav a:hover {
    background-color: rgba(100, 181, 246, 0.8); /* Semi-transparent hover background */
    transform: scale(1.05);
}

/* Main content */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background: #fff;
    padding: .5rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

section:hover {
    transform: translateY(-3px);
}

section h2 {
    color: #1565c0;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
}

section p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Location section on jobs.php */
.location-section {
    border-left: 3px solid #1565c0;
}

.hiring-description {
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Thumbnail for uploaded file */
.thumbnail-container {
    margin-bottom: 1rem;
    text-align: center;
}

.thumbnail-link {
    display: inline-block;
    transition: transform 0.2s;
}

.thumbnail-link:hover {
    transform: scale(1.05);
}

.thumbnail-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thumbnail-icon {
    width: 50px;
    height: 50px;
}

/* File links */
.file-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.file-links li {
    margin-bottom: 0.5rem;
}

.file-links a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
}

.file-links a:hover {
    text-decoration: underline;
    color: #42a5f5;
}

/* Buttons */
.btn, button {
    display: inline-block;
    background-color: #d81b60; /* Pink for contrast */
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover, button:hover {
    background-color: #ad1457;
    transform: translateY(-2px);
}

.btn:active, button:active {
    transform: translateY(0);
}

/* Add row button */
.add-row-btn {
    background-color: #42a5f5; /* Blue to match theme */
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    margin-top: 0.25rem; /* Reduced for tighter spacing */
    display: block;
    width: fit-content;
}

.add-row-btn:hover {
    background-color: #1565c0;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 700px;
    margin: 0 auto;
    background: #f5f5f5;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.schedule-form {
	margin-left: 5px;
	max-width: 1100px;
}

label {
    font-weight: 600;
    color: #1565c0;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

/* Checkbox and radio button alignment */
form label.checkbox-label, form label.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

form input[type="checkbox"], form input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1565c0;
}

/* Horizontal checkbox and radio groups */
.checkbox-group, .radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.checkbox-group label, .radio-group label {
    margin-bottom: 0;
}

/* Employment history, education, and references tables */
.employment-history-table, .education-table, .references-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.25rem; /* Reduced for tighter spacing with button */
}

.employment-history-table th, .employment-history-table td,
.education-table th, .education-table td,
.references-table th, .references-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
}

.employment-history-table th,
.education-table th,
.references-table th {
    background-color: #e3f2fd;
    font-weight: 600;
    color: #1565c0;
    font-size: 0.95rem;
}

.employment-history-table input[type="text"],
.employment-history-table input[type="date"],
.employment-history-table textarea,
.education-table input[type="text"],
.education-table input[type="number"],
.references-table input[type="text"],
.references-table textarea {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.employment-history-table textarea,
.references-table textarea {
    min-height: 60px;
    resize: vertical;
}

.employment-history-table input:focus,
.employment-history-table textarea:focus,
.education-table input:focus,
.references-table input:focus,
.references-table textarea:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 6px rgba(66, 165, 245, 0.2);
}

/* Shift availability layout */
.shift-availability {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.day-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 67px;
}

.day-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1565c0;
    margin-bottom: 0.25rem;
}

.shift-availability select {
    width: 100%;
    padding: 0.4rem 1.5rem 0.4rem 0.4rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    background: #fff;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%231565c0%22%20d%3D%22M1%204l5%205%205-5H1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
}

.shift-availability select option.placeholder-option {
    font-size: 0.85rem;
    color: #666;
}

.shift-availability select:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 6px rgba(66, 165, 245, 0.2);
    outline: none;
}

/* Customer Service Rating Section */
.customer-service-rating .rating-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.customer-service-rating input[type="number"] {
    width: 60px;
    text-align: center;
}

.rating-label {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.rating-min {
    order: 1;
}

.rating-max {
    order: 3;
}

.customer-service-rating input[type="number"] {
    order: 2;
}

/* CAPTCHA section */
.captcha-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.captcha-label, .robot-label {
    font-weight: 600;
    color: #1565c0;
    font-size: 1rem;
    margin: 0;
    text-align: left;
}

.robot-label {
    font-weight: 400;
    font-size: 0.95rem;
    color: #333;
}

.captcha-checkbox, .robot-checkbox {
    width: 32px;
    height: 32px;
    accent-color: #1565c0;
    margin: 0;
}

.captcha-instruction {
    font-size: 0.9rem;
    color: #666;
    text-align: left; /* Align with the text above */
    margin: 0;
    margin-left: 2rem; /* Indent to align with the text labels */
}

/* File upload section */
input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="file"]:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 6px rgba(66, 165, 245, 0.2);
    outline: none;
}

.file-instruction {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

.form-instruction {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

input, textarea, select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-top: 0; /* Ensure no extra top margin */
}

input:focus, textarea:focus, select:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 6px rgba(66, 165, 245, 0.2);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Error and success messages */
p[style*="color: red"], p[style*="color: green"] {
    background-color: #ffcdd2;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

p[style*="color: green"] {
    background-color: #e8f5e9;
}

/* Lists (e.g., job applications in manager.php) */
ul {
    list-style: none;
}

ul li {
    padding: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

ul li:hover {
    background-color: #e3f2fd;
}

ul li a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

ul li a:hover {
    text-decoration: underline;
    color: #42a5f5;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    color: #fff;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Groups (for general sections) */
.form-group {
    background-color: #fafafa; /* Very light gray background */
    padding: 0.75rem;
    border-radius: 4px;
    border-bottom: 1px solid #e0e0e0; /* Subtle bottom border for separation */
    margin-bottom: 0.5rem;
}

.form-group:hover {
    background-color: #f7f7f7; /* Slightly darker on hover for interactivity */
    transition: background-color 0.3s ease;
}

/* Form Sections (for Education, References, Employment History) */
.form-section {
    background-color: #fafafa; /* Match form-group background */
    padding: 0.75rem;
    border-radius: 4px;
    border-bottom: 1px solid #e0e0e0; /* Match form-group separator */
    margin-bottom: 0.5rem;
}

/* Retain unique left borders for Education, References, Employment */
.education-section {
    border-left: 3px solid #42a5f5; /* Blue for Education */
}

.references-section {
    border-left: 3px solid #d81b60; /* Pink for References */
}

.employment-section {
    border-left: 3px solid #4caf50; /* Green for Employment History */
}

.form-section:hover {
    background-color: #f7f7f7; /* Match form-group hover */
    transition: background-color 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    main {
        padding: 0 1rem;
    }

    section {
        padding: 1.25rem;
    }

    form {
        padding: 1rem;
        max-width: 100%;
    }

    .btn, button {
        padding: 0.5rem 1rem;
    }

    .checkbox-group, .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .shift-availability {
        flex-wrap: wrap;
        gap: 1rem;
        overflow-x: visible;
    }

    .day-column {
        min-width: 60px;
    }

    .captcha-checkbox, .robot-checkbox {
        width: 28px; /* Slightly smaller for smaller screens */
        height: 28px;
    }

    .employment-history-table th, .employment-history-table td,
    .education-table th, .education-table td,
    .references-table th, .references-table td {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .employment-history-table input[type="text"],
    .employment-history-table input[type="date"],
    .employment-history-table textarea,
    .education-table input[type="text"],
    .education-table input[type="number"],
    .references-table input[type="text"],
    .references-table textarea {
        font-size: 0.85rem;
        padding: 0.3rem;
    }

    .customer-service-rating .rating-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-label {
        font-size: 0.85rem;
    }

    .thumbnail-image {
        width: 80px;
        height: 80px;
    }

    .thumbnail-icon {
        width: 40px;
        height: 40px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    input, textarea, select {
        font-size: 0.9rem;
        padding: 0.4rem;
    }

    form label, form label.checkbox-label, form label.radio-label {
        font-size: 0.9rem;
    }

    .btn, button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .shift-availability select {
        font-size: 0.85rem;
    }

    .shift-availability select option.placeholder-option {
        font-size: 0.8rem;
    }

    .captcha-label, .robot-label {
        font-size: 0.95rem;
    }

    .captcha-instruction, .file-instruction {
        font-size: 0.85rem;
    }

    .captcha-checkbox, .robot-checkbox {
        width: 24px; /* Further reduced for very small screens */
        height: 24px;
    }

    .employment-history-table th, .employment-history-table td,
    .education-table th, .education-table td,
    .references-table th, .references-table td {
        font-size: 0.85rem;
        padding: 0.3rem;
    }

    .employment-history-table input[type="text"],
    .employment-history-table input[type="date"],
    .employment-history-table textarea,
    .education-table input[type="text"],
    .education-table input[type="number"],
    .references-table input[type="text"],
    .references-table textarea {
        font-size: 0.8rem;
    }

    .thumbnail-image {
        width: 60px;
        height: 60px;
    }

    .thumbnail-icon {
        width: 30px;
        height: 30px;
    }
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.progress-step {
    padding: 10px 20px;
    background-color: #e0e0e0;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.progress-step.active {
    background-color: #4caf50;
    color: white;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Error Styling */
.error {
    border-color: red;
}

/* Thumbnails for job applications */
.thumbnails {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.thumbnail, .icon {
    height: 20px;
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

/* Header Actions */
.header-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.small-button {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #607d8b; /* Blueish-gray */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.small-button:hover {
    background-color: #455a64; /* Darker blueish-gray on hover */
}

.small-button:active {
    background-color: #37474f; /* Even darker on click */
    transform: translateY(1px);
}

form.small-button {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    display: inline;
}

form[action="logout.php"] {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    outline: none;
    display: inline-flex;
    align-items: center;
}

form[action="logout.php"] button {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    height: 100%;
    width: 100%;
}

form[action="logout.php"] .small-button {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #607d8b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

nav a.active {
    font-weight: bold;
    color: #000;
}

.manager-container {
    display: flex;
    gap: 20px;
}

.left-column, .right-column {
    flex: 1;
}

@media (max-width: 768px) {
    .manager-container {
        flex-direction: column;
    }
}

/* Welcome message */
.welcome-message {
    color: #42a5f5;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
}