/**
 * AutoRento Marketplace styles.
 * Spalvos suderintos su esama autorento.lt: balta + #08153d.
 */

:root {
    --ar-primary: #08153d;
    --ar-primary-hover: #0b1d54;
    --ar-accent: #2f5bea;
    --ar-bg: #f8fafc;
    --ar-card: #ffffff;
    --ar-border: #e7ebf1;
    --ar-text: #0f172a;
    --ar-muted: #718096;
    --ar-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    --ar-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.09);
    --ar-radius: 14px;
    --ar-radius-lg: 24px;
}

.ar-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }

/* HERO */
.ar-hero {
    text-align: center;
    padding: 60px 24px;
    background: linear-gradient(135deg, var(--ar-primary) 0%, #15275f 100%);
    color: #fff;
    border-radius: var(--ar-radius-lg);
    margin-bottom: 32px;
}
.ar-hero h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.2; }
.ar-hero-subtitle { margin: 0 0 24px; opacity: 0.85; font-size: 18px; }

/* BUTTONS */
.ar-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: var(--ar-radius);
    font-weight: 700; font-size: 15px; text-decoration: none;
    border: none; cursor: pointer; transition: all 0.2s ease;
    line-height: 1; min-height: 48px;
}
.ar-btn-primary {
    background: var(--ar-primary); color: #fff;
}
.ar-btn-primary:hover { background: var(--ar-primary-hover); transform: translateY(-1px); }
.ar-btn-secondary {
    background: #eef2f7; color: var(--ar-text);
}
.ar-btn-secondary:hover { background: #e5ebf3; }
.ar-btn-google {
    background: #fff; color: var(--ar-text);
    border: 1px solid var(--ar-border);
    width: 100%; justify-content: center;
}
.ar-btn-google:hover { background: #f8fafc; }
.ar-google-icon {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(45deg, #4285f4, #ea4335, #fbbc04, #34a853);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    margin-right: 10px; font-weight: 700; font-size: 13px;
}

/* MAP */
.ar-car-map { height: 650px; width: 100%; border-radius: var(--ar-radius-lg); overflow: hidden; box-shadow: var(--ar-shadow); margin-bottom: 28px; }
@media (max-width: 768px) { .ar-car-map { height: 500px; } }

/* CARS GRID (suderinta su esama) */
.cars-container { display: grid; gap: 22px; align-items: stretch; }
.cars-container.autorento-fluid-layout { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.car-card {
    background: var(--ar-card);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg);
    overflow: hidden;
    box-shadow: var(--ar-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; display: flex; flex-direction: column;
}
.car-card:hover { transform: translateY(-3px); box-shadow: var(--ar-shadow-lg); }
.car-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.car-card-image-wrap { position: relative; width: 100%; height: 260px; background: #f3f4f6; }
.car-card img { width: 100%; height: 100%; object-fit: cover; }
.car-info { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.price-badge {
    display: inline-flex; padding: 10px 16px; border-radius: var(--ar-radius);
    background: #f8fafc; border: 1px solid #e3eaf2; color: var(--ar-text);
    font-size: 15px; font-weight: 700; width: fit-content; margin-bottom: 14px;
}
.car-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--ar-text); }
.car-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.car-badges span { padding: 8px 14px; border-radius: 999px; background: #f1f5f9; color: var(--ar-muted); font-size: 13px; font-weight: 500; }
.car-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.car-grid-item { background: #f8fafc; border: 1px solid #e3eaf2; border-radius: 18px; padding: 14px 16px; }
.car-grid-item small { display: block; margin-bottom: 8px; font-size: 13px; color: var(--ar-muted); font-weight: 500; }
.car-grid-item strong { font-size: 16px; color: var(--ar-text); font-weight: 700; }
.car-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.car-link-text { font-size: 16px; color: var(--ar-text); font-weight: 600; }
.car-arrow {
    width: 54px; height: 54px; border-radius: 999px;
    background: var(--ar-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; transition: transform 0.2s ease;
}
.car-card:hover .car-arrow { transform: translateX(3px); }

/* FILTERS (suderinta su esama autorento.lt) */
.autorento-filters-wrap { margin-bottom: 28px; }
.autorento-filters-toggle {
    display: inline-flex; align-items: center; justify-content: space-between;
    gap: 12px; min-height: 48px; min-width: 150px; padding: 0 16px 0 18px;
    border: 1px solid #dbe3ec; border-radius: var(--ar-radius);
    background: #fff; color: var(--ar-text); font-size: 15px; font-weight: 700;
    cursor: pointer; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    margin-bottom: 14px;
}
.autorento-filters-toggle-icon {
    width: 24px; height: 24px; border-radius: 999px; background: #f1f5f9; color: var(--ar-text);
    display: inline-flex; align-items: center; justify-content: center;
}
.autorento-filters {
    padding: 18px; background: #fff; border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg); box-shadow: var(--ar-shadow);
}
.autorento-filters.is-hidden { display: none; }
.autorento-filters-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.autorento-filter-item input, .autorento-filter-item select {
    width: 100%; height: 50px; border: 1px solid #d9dee7; border-radius: var(--ar-radius);
    padding: 0 14px; background: #fff; color: var(--ar-text); font-size: 15px;
}
.autorento-filter-item-search { grid-column: span 2; }
.autorento-filter-actions { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.autorento-filter-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 18px; border-radius: var(--ar-radius);
    font-size: 14px; font-weight: 700; text-decoration: none;
}
.autorento-filter-btn-secondary { background: #eef2f7; color: var(--ar-text); }

/* MAP MARKERS */
.car-pin { display: flex; flex-direction: column; align-items: center; position: relative; }
.car-pin-price { position: absolute; top: -12px; background: var(--ar-primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
.car-pin-inner { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,0.25); margin-top: 14px; }
.car-pin-inner img { width: 100%; height: 100%; object-fit: cover; }
.car-pin-tip { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid #fff; }

/* HOW IT WORKS */
.ar-how-it-works {
    background: #fff; border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg); padding: 32px; margin-top: 40px;
    box-shadow: var(--ar-shadow);
}
.ar-how-it-works h2 { margin-top: 0; }
.ar-how-it-works ol { margin: 0; padding-left: 24px; }
.ar-how-it-works li { margin: 8px 0; }

/* AUTH FORMS */
.ar-auth-card {
    max-width: 460px; margin: 40px auto;
    background: #fff; border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg); padding: 32px;
    box-shadow: var(--ar-shadow);
}
.ar-auth-card h2 { margin-top: 0; text-align: center; }
.ar-auth-divider {
    display: flex; align-items: center; margin: 18px 0;
    color: var(--ar-muted); font-size: 13px;
}
.ar-auth-divider::before, .ar-auth-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--ar-border);
}
.ar-auth-divider span { padding: 0 12px; }
.ar-auth-links { text-align: center; margin-top: 18px; font-size: 14px; }
.ar-auth-links a { color: var(--ar-primary); text-decoration: none; }
.ar-sep { color: var(--ar-muted); margin: 0 8px; }

/* FORMS */
.ar-form { display: flex; flex-direction: column; gap: 14px; }
.ar-form label { display: flex; flex-direction: column; gap: 6px; }
.ar-form label > span { font-size: 14px; font-weight: 600; color: var(--ar-text); }
.ar-form input[type="text"], .ar-form input[type="email"], .ar-form input[type="password"],
.ar-form input[type="tel"], .ar-form input[type="number"], .ar-form input[type="date"],
.ar-form select, .ar-form textarea {
    border: 1px solid #d9dee7; border-radius: var(--ar-radius);
    padding: 12px 14px; font-size: 15px; background: #fff;
    font-family: inherit;
}
.ar-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ar-form-grid label { gap: 6px; }
.ar-form-full { grid-column: 1 / -1; }
.ar-form-actions { display: flex; gap: 12px; }
.ar-form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.ar-checkbox { flex-direction: row !important; align-items: center; gap: 10px !important; }
.ar-checkbox input { margin: 0; }

.ar-error { background: #fef2f2; color: #b91c1c; border-radius: var(--ar-radius); padding: 12px 14px; margin-bottom: 12px; }
.ar-success { background: #ecfdf5; color: #166534; border-radius: var(--ar-radius); padding: 12px 14px; margin-bottom: 12px; }
.ar-help { color: var(--ar-muted); font-size: 13px; margin: 4px 0 0; }
.ar-loading { color: var(--ar-muted); }

/* ACCOUNT */
.ar-account {
    display: grid; grid-template-columns: 280px 1fr;
    gap: 24px; max-width: 1200px; margin: 24px auto; padding: 16px;
}
@media (max-width: 768px) { .ar-account { grid-template-columns: 1fr; } }

.ar-account-sidebar {
    background: #fff; border: 1px solid var(--ar-border); border-radius: var(--ar-radius-lg);
    padding: 24px 16px; box-shadow: var(--ar-shadow); position: sticky; top: 16px; align-self: start;
}
.ar-account-user { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ar-account-user img { border-radius: 50%; }
.ar-account-user-info { display: flex; flex-direction: column; }
.ar-account-user-info strong { font-size: 15px; }
.ar-account-user-info span { font-size: 12px; color: var(--ar-muted); }
.ar-account-nav { display: flex; flex-direction: column; gap: 4px; }
.ar-account-nav a {
    padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ar-text);
    font-size: 14px; font-weight: 500;
}
.ar-account-nav a:hover { background: #f8fafc; }
.ar-account-nav a.is-active { background: var(--ar-primary); color: #fff; }
.ar-account-logout { color: #b91c1c !important; }

.ar-account-content {
    background: #fff; border: 1px solid var(--ar-border); border-radius: var(--ar-radius-lg);
    padding: 32px; box-shadow: var(--ar-shadow); min-height: 400px;
}

.ar-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 24px; }
.ar-profile-item { background: #f8fafc; border: 1px solid #e3eaf2; border-radius: 16px; padding: 14px 16px; }
.ar-profile-item small { color: var(--ar-muted); font-size: 12px; display: block; margin-bottom: 4px; }
.ar-profile-item strong { font-size: 15px; }

/* BOOKING & REQUESTS LIST */
.ar-booking-item, .ar-request-item, .ar-my-car {
    display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: center;
    padding: 16px; border: 1px solid var(--ar-border); border-radius: var(--ar-radius-lg);
    margin-bottom: 12px; background: #fff;
}
.ar-booking-item img, .ar-request-item img, .ar-my-car-img img { width: 100px; height: 70px; object-fit: cover; border-radius: 10px; }
.ar-booking-meta { display: flex; flex-direction: column; gap: 4px; }
.ar-booking-title { font-weight: 700; font-size: 16px; }
.ar-booking-dates { color: var(--ar-muted); font-size: 13px; }
.ar-booking-actions { display: flex; gap: 8px; }

.ar-status {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; text-transform: capitalize;
}
.ar-status-pending   { background: #fef3c7; color: #92400e; }
.ar-status-confirmed { background: #dbeafe; color: #1e40af; }
.ar-status-paid      { background: #d1fae5; color: #065f46; }
.ar-status-active    { background: #d1fae5; color: #065f46; }
.ar-status-completed { background: #e5e7eb; color: #374151; }
.ar-status-cancelled, .ar-status-rejected { background: #fee2e2; color: #b91c1c; }

/* LANGUAGE SWITCHER */
.autorento-lang-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.autorento-lang {
    padding: 6px 10px; border-radius: 8px; text-decoration: none;
    color: var(--ar-text); font-size: 13px; font-weight: 600;
    background: #f1f5f9; transition: 0.2s;
}
.autorento-lang:hover, .autorento-lang.is-active { background: var(--ar-primary); color: #fff; }

/* SECTION TITLE */
.ar-section-title { margin: 36px 0 20px; font-size: 24px; }

/* RESPONSIVE */
@media (max-width: 991px) {
    .autorento-filters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .ar-hero h1 { font-size: 28px; }
    .autorento-filters-grid { grid-template-columns: 1fr; }
    .autorento-filter-item-search { grid-column: span 1; }
    .ar-form-grid { grid-template-columns: 1fr; }
    .ar-booking-item, .ar-request-item, .ar-my-car { grid-template-columns: 80px 1fr; }
    .ar-booking-actions { grid-column: 1 / -1; }
}
