/* Base Styles */
:root {
--primary-color: #2196F3;
/* Blue */
--primary-light: #BBDEFB;
/* Light Blue */
--primary-extra-light: #E3F2FD;
/* Extra Light Blue */
--secondary-color: #f8f9fa;
/* Light Gray */
--dark-color: #343a40;
/* Dark Gray */
--text-color: #495057;
/* Gray */
--white-color: #ffffff;
--gray-light: #f0f2f5;
--border-color: #dee2e6;
--success-color: #28a745;
--error-color: #dc3545;
--warning-color: #ffc107;
--header-height: 80px;
--border-radius: 8px;
--transition-speed: 0.3s;
}
/* Accessibility helpers */
.visually-hidden {
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap;
}
/* Skip link */
.skip-link {
position: absolute;
left: -999px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
background: #000;
color: #fff;
padding: 8px 16px;
z-index: 2000;
}
.skip-link:focus {
left: 10px;
top: 10px;
width: auto;
height: auto;
border-radius: 4px;
text-decoration: none;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'Prompt', 'Kanit', sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--white-color);
}
a {
text-decoration: none;
color: var(--primary-color);
}
ul {
list-style: none;
}
img {
max-width: 100%;
height: auto;
display: block;
}
.container {
width: 1440px;
max-width: 95%;
margin: 0 auto;
padding: 0 20px;
}
.section {
padding: 80px 0;
}
.section-description {
text-align: center;
max-width: 700px;
margin: 15px auto 50px;
color: var(--text-color);
font-size: 1.1rem;
}
h1, h2, h3 {
font-family: 'Kanit', 'Prompt', sans-serif;
color: var(--dark-color);
margin-bottom: 20px;
font-weight: 600;
}
h1 {
font-size: 3.5rem;
line-height: 1.2;
}
h2 {
font-size: 2.5rem;
text-align: center;
}
h3 {
font-size: 1.8rem;
}
.text-center {
text-align: center;
}
.mt-4 {
margin-top: 40px;
}
/* Buttons */
.btn {
display: inline-block;
padding: 12px 25px;
border-radius: var(--border-radius);
font-weight: 600;
cursor: pointer;
transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
font-size: 1rem;
text-align: center;
border: none;
white-space: nowrap;
}
.btn-primary {
background-color: var(--primary-color);
color: var(--white-color);
}
.btn-primary:hover {
background-color: #1976D2;
}
.btn-secondary {
background-color: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
background-color: var(--primary-light);
color: var(--primary-color);
}
.btn-search {
width: 100%;
margin-top: 20px;
}
/* Header */
.header {
background-color: var(--white-color);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
position: sticky;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
height: var(--header-height);
display: flex;
align-items: center;
}
.header .container {
display: flex;
gap: 20px;
justify-content: space-between;
align-items: center;
padding: 0;
}
.header nav {
margin-left: auto;
}
.logo {
font-size: 1.8rem;
font-weight: 600;
color: var(--primary-color);
display: flex;
align-items: center;
}
.logo i {
margin-right: 10px;
font-size: 2.2rem;
}
.nav ul {
display: flex;
gap: 30px;
align-items: center;
}
.nav-link {
color: var(--dark-color);
font-weight: 400;
padding: 5px 0;
position: relative;
transition: color var(--transition-speed);
}
.nav-link:hover, .nav-link.active {
color: var(--primary-color);
}
.nav-link::after {
content: '';
position: absolute;
left: 0;
bottom: -5px;
width: 0;
height: 2px;
background-color: var(--primary-color);
transition: width var(--transition-speed);
}
.nav-link:hover::after, .nav-link.active::after {
width: 100%;
}
.nav .btn {
margin-left: 15px;
padding: 8px 18px;
}
.menu-toggle {
display: none;
font-size: 1.8rem;
cursor: pointer;
color: var(--dark-color);
border: none;
background-color: transparent;
margin-left: auto;
}
/* Hero Section */
.hero {
background: url('../img/hero-banner.webp') no-repeat center center/cover;
height: calc(100vh - var(--header-height));
display: flex;
align-items: center;
justify-content: center;
color: var(--white-color);
position: relative;
text-align: center;
}
.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
/* Dark overlay */
}
.hero-content {
position: relative;
z-index: 1;
max-width: 800px;
padding: 20px;
}
.hero h1 {
color: var(--white-color);
font-size: 4rem;
margin-bottom: 20px;
}
.hero p {
font-size: 1.5rem;
margin-bottom: 40px;
}
.search-form {
background-color: var(--white-color);
padding: 30px;
border-radius: var(--border-radius);
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: space-between;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
color: var(--text-color);
text-align: left;
}
.search-form .form-group {
flex: 1;
min-width: 200px;
/* Allow for smaller width on smaller screens */
}
.search-form label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: var(--dark-color);
font-size: 0.95rem;
}
.search-form label i {
margin-right: 8px;
color: var(--primary-color);
}
.search-form input[type="text"],
.search-form input[type="date"] {
width: 100%;
padding: 12px 15px;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
font-size: 1rem;
font-family: 'Prompt', sans-serif;
transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.search-form input[type="text"]:focus,
.search-form input[type="date"]:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.25);
}
/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
}
/* Grids */
.grid-3 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.grid-4 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
}
/* Featured Cars */
.featured-cars {
background-color: var(--gray-light);
}
.car-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
margin-top: 50px;
}
.car-card {
background-color: var(--white-color);
border-radius: var(--border-radius);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
overflow: hidden;
transition: transform var(--transition-speed), box-shadow var(--transition-speed);
display: flex;
flex-direction: column;
}
.car-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.car-card img {
width: 100%;
height: 200px;
object-fit: cover;
border-bottom: 1px solid var(--border-color);
}
.car-card h3 {
font-size: 1.4rem;
margin: 15px 15px 5px;
color: var(--dark-color);
}
.car-card p {
font-size: 0.95rem;
color: var(--text-color);
margin: 0 15px 10px;
}
.car-card .price {
font-size: 1.2rem;
font-weight: 600;
color: var(--primary-color);
margin: 0 15px 15px;
}
.car-card .btn {
margin: 0 15px 15px;
padding: 10px 15px;
font-size: 0.95rem;
}
/* How It Works */
.how-it-works .steps-grid {
margin-top: 50px;
}
.step-item {
text-align: center;
padding: 30px;
background-color: var(--white-color);
border-radius: var(--border-radius);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.icon-circle {
width: 80px;
height: 80px;
border-radius: 50%;
background-color: var(--primary-extra-light);
color: var(--primary-color);
display: flex;
align-items: center;
justify-content: center;
font-size: 2.5rem;
margin: 0 auto 20px;
border: 2px solid var(--primary-light);
}
.step-item h3 {
margin-bottom: 15px;
color: var(--dark-color);
font-size: 1.6rem;
}
.step-item p {
font-size: 1rem;
color: var(--text-color);
}
/* Why Choose Us */
.why-choose-us .features-grid {
margin-top: 50px;
}
.feature-item {
text-align: center;
padding: 30px;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
transition: all var(--transition-speed);
}
.feature-item:hover {
background-color: var(--primary-extra-light);
border-color: var(--primary-light);
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.feature-item i {
font-size: 3rem;
color: var(--primary-color);
margin-bottom: 20px;
}
.feature-item h3 {
font-size: 1.6rem;
margin-bottom: 15px;
}
/* Footer */
.footer {
background-color: var(--dark-color);
color: var(--gray-light);
padding: 60px 0 20px;
font-size: 0.95rem;
}
.footer h3 {
color: var(--white-color);
margin-bottom: 20px;
font-size: 1.5rem;
display: flex;
align-items: center;
}
.footer h3 i {
margin-right: 10px;
color: var(--primary-color);
font-size: 1.8rem;
}
.footer-col ul li {
margin-bottom: 10px;
}
.footer-col ul li a {
color: var(--gray-light);
transition: color var(--transition-speed);
}
.footer-col ul li a:hover {
color: var(--primary-color);
}
.footer-col p {
margin-bottom: 10px;
}
.footer-col p i {
margin-right: 10px;
color: var(--primary-light);
}
.social-links a {
color: var(--white-color);
font-size: 1.3rem;
margin-right: 15px;
transition: color var(--transition-speed);
}
.social-links a:hover {
color: var(--primary-color);
}
.footer-bottom {
text-align: center;
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* Notification */
.notification-container {
position: fixed;
top: calc(var(--header-height) + 10px);
right: 20px;
z-index: 1001;
max-width: 350px;
width: 100%;
display: none;
/* Hidden by default */
}
.alert {
padding: 15px 20px;
border-radius: var(--border-radius);
color: var(--white-color);
font-weight: 500;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
animation: fadein 0.5s, fadeout 0.5s 2.5s forwards;
}
.alert-info {
background-color: var(--primary-color);
}
.alert-success {
background-color: var(--success-color);
}
.alert-error {
background-color: var(--error-color);
}
.alert-warning {
background-color: var(--warning-color);
}
@keyframes fadein {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeout {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(-20px);
}
}
/* Loading Spinner */
.loading-spinner {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 2000;
color: var(--primary-color);
font-size: 2rem;
display: none;
/* Hidden by default */
}
.loading-spinner i {
font-size: 4rem;
margin-bottom: 20px;
}
.loading-spinner span {
font-size: 1.5rem;
font-weight: 600;
}
/* Modal styles (improved design) */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
padding: 20px;
backdrop-filter: blur(2px);
}
.modal {
background: var(--white-color);
border-radius: 12px;
max-width: 520px;
width: 100%;
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
overflow: hidden;
animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
}
.modal .modal-close {
position: absolute;
right: 16px;
top: 16px;
background: var(--gray-light);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
font-size: 1.2rem;
line-height: 1;
cursor: pointer;
color: var(--text-color);
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s, color 0.2s;
z-index: 1;
}
.modal .modal-close:hover {
background: var(--error-color);
color: white;
}
.modal .modal-body {
padding: 32px;
max-height: 80vh;
overflow-y: auto;
}
.modal h3 {
margin-top: 0;
margin-bottom: 24px;
color: var(--dark-color);
font-size: 1.5rem;
text-align: center;
border-bottom: 2px solid var(--primary-light);
padding-bottom: 12px;
}
@keyframes modal-in {
from {
transform: translateY(-30px) scale(0.95);
opacity: 0;
}
to {
transform: translateY(0) scale(1);
opacity: 1;
}
}
/* Form styles for modals and general use */
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: var(--dark-color);
font-size: 0.95rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
width: 100%;
padding: 12px 16px;
border: 2px solid var(--border-color);
border-radius: var(--border-radius);
font-size: 1rem;
font-family: 'Prompt', sans-serif;
transition: border-color 0.3s, box-shadow 0.3s;
background: var(--white-color);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}
.form-group input::placeholder {
color: #999;
}
.form-group input[type="checkbox"] {
width: auto;
margin-right: 8px;
}
.form-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--border-color);
}
.form-actions .btn {
min-width: 100px;
}
/* Dashboard specific modal styles */
.dashboard-modal .modal {
max-width: 720px;
}
.dashboard-modal .booking-list {
list-style: none;
padding: 0;
}
.dashboard-modal .booking-list li {
padding: 16px;
margin-bottom: 12px;
background: var(--gray-light);
border-radius: var(--border-radius);
border-left: 4px solid var(--primary-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.dashboard-modal .booking-list li:last-child {
margin-bottom: 0;
}
/* Car detail modal styles */
.car-detail {
text-align: center;
}
.car-detail img {
border-radius: var(--border-radius);
margin-bottom: 20px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.car-detail h3 {
border-bottom: none;
text-align: left;
margin-bottom: 16px;
}
.car-detail p {
text-align: left;
margin-bottom: 12px;
line-height: 1.6;
}
/* Edit profile modal styles */
.edit-profile-modal hr {
margin: 24px 0;
border: none;
border-top: 1px solid var(--border-color);
}
.edit-profile-modal h4 {
color: var(--dark-color);
margin-bottom: 16px;
font-size: 1.2rem;
}
/* Toast notification stack (used by ui._renderNotifications) */
.notification-stack {
display: flex;
flex-direction: column;
gap: 10px;
}
.toast {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-radius: 8px;
color: var(--white-color);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
animation: toast-in 0.25s ease-out;
}
.toast .toast-body {
flex: 1;
margin-right: 8px;
}
.toast .toast-close {
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.9);
font-size: 1.1rem;
cursor: pointer;
}
.toast-info {
background: var(--primary-color);
}
.toast-success {
background: var(--success-color);
}
.toast-error {
background: var(--error-color);
}
.toast-warning {
background: var(--warning-color);
color: #222;
}
@keyframes toast-in {
from {
transform: translateY(-6px);
opacity: 0
}
to {
transform: translateY(0);
opacity: 1
}
}
/* Small responsive tweaks */
@media (max-width: 640px) {
.modal {
max-width: 95%;
}
.notification-container {
left: 10px;
right: 10px;
max-width: calc(100% - 20px);
}
}