/* ============================================================
   RentGuide.gr — assets/css/guide.css
   Φάκελος: /rentguide/assets/css/guide.css
   Mobile-first — η σελίδα του πελάτη
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #1a3c5e;
    --primary-light:#2a5a8e;
    --accent:       #e8a020;
    --success:      #10b981;
    --danger:       #ef4444;
    --warning:      #f59e0b;
    --text:         #1f2937;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --bg:           #f8fafc;
    --white:        #ffffff;
    --radius:       10px;
    --shadow:       0 2px 8px rgba(0,0,0,.08);
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 60px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.guide-header {
    background: var(--primary);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.guide-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.guide-logo {
    height: 36px;
    object-fit: contain;
}

.guide-company-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.guide-lang-switcher {
    display: flex;
    gap: 4px;
}

.guide-lang {
    font-size: 20px;
    opacity: .5;
    transition: opacity .2s;
    text-decoration: none;
    line-height: 1;
}

.guide-lang.active,
.guide-lang:hover { opacity: 1; text-decoration: none; }

/* Όχημα info */
.guide-vehicle-info {
    padding: 10px 16px 12px;
}

.guide-vehicle-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.guide-vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.guide-vehicle-meta span {
    font-size: 12px;
    background: rgba(255,255,255,.15);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 20px;
}

/* ===== TABS ===== */
.guide-tabs {
    display: flex;
    overflow-x: auto;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 95px;
    z-index: 90;
}

.guide-tabs::-webkit-scrollbar { display: none; }

.guide-tab {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all .2s;
    text-decoration: none;
    cursor: pointer;
}

.guide-tab.active,
.guide-tab:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-decoration: none;
}

/* ===== MAIN ===== */
.guide-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

/* ===== SECTIONS ===== */
.guide-section { display: none; }
.guide-section.active { display: block; }

/* ===== ALERT ===== */
.guide-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.guide-alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.guide-alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

/* ===== CARDS ===== */
.guide-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}

.guide-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.guide-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
}

.guide-text-sm {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== CONTACT BUTTONS ===== */
.guide-contact-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    min-width: 130px;
    transition: opacity .2s;
}

.guide-contact-btn:hover { opacity: .85; text-decoration: none; }

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

.guide-btn-whatsapp {
    background: #25d366;
    color: var(--white);
}

/* ===== INFO ROWS ===== */
.guide-info-row {
    font-size: 14px;
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

/* ===== RULES LIST ===== */
.guide-rules-list { display: flex; flex-direction: column; gap: 8px; }

.guide-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.guide-rule:last-child { border-bottom: none; }
.guide-rule-icon { font-size: 18px; }

/* ===== TIPS ===== */
.guide-tip-group { margin-bottom: 8px; }

.guide-tip-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    margin-top: 16px;
}

.guide-tip-card { padding: 14px; }

.guide-tip-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text);
}

.guide-maps-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 20px;
}

.guide-maps-link:hover { background: #dbeafe; text-decoration: none; }

/* ===== FAQ ACCORDION ===== */
.guide-accordion { display: flex; flex-direction: column; gap: 8px; }

.guide-faq-item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.guide-faq-question {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: background .15s;
}

.guide-faq-question:hover { background: var(--bg); }
.guide-faq-question.open { color: var(--primary); }

.guide-faq-icon {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform .2s;
}

.guide-faq-question.open .guide-faq-icon { transform: rotate(45deg); }

.guide-faq-answer {
    display: none;
    padding: 0 16px 14px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
    border-top: 1px solid var(--border);
}

.guide-faq-answer.open { display: block; }

/* ===== PHOTO GRID ===== */
.guide-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

@media (max-width: 360px) {
    .guide-photo-grid { grid-template-columns: repeat(2, 1fr); }
}

.guide-photo-slot {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color .2s;
    aspect-ratio: 1;
}

.guide-photo-slot.required { border-color: #fca5a5; }
.guide-photo-slot.uploaded { border-color: var(--success); }
.guide-photo-slot.required.uploaded { border-color: var(--success); }

.guide-photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guide-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-photo-icon { font-size: 28px; opacity: .4; }

.guide-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 5px;
    text-align: center;
    line-height: 1.3;
}

.guide-required-dot {
    color: var(--danger);
    font-size: 12px;
}

.guide-photo-check {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

/* Hidden file input — το label καλύπτει ολόκληρο το slot */
.guide-file-input { display: none; }

.guide-photo-tap-area {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 10;
}

/* ===== FORMS ===== */
.guide-field {
    margin-bottom: 14px;
}

.guide-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.guide-field input[type="text"],
.guide-field input[type="email"],
.guide-field input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px; /* 16px για να μην κάνει zoom το iOS */
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    transition: border-color .2s;
    -webkit-appearance: none;
}

.guide-field input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== BUTTONS ===== */
.guide-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: background .2s;
    -webkit-appearance: none;
    margin-top: 8px;
}

.guide-btn-primary:hover { background: var(--primary-light); }

.guide-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ===== FOOTER ===== */
.guide-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

.guide-footer a { color: var(--text-muted); }

/* ===== UPLOAD PROGRESS ===== */
.guide-photo-uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== DESKTOP ===== */
@media (min-width: 640px) {
    .guide-main { padding: 24px 16px; }
    .guide-contact-btn { flex: none; }
    .guide-photo-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== SPINNER ===== */
.guide-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rg-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes rg-spin {
    to { transform: rotate(360deg); }
}

/* ===== VEHICLE PHOTO ===== */
.guide-vehicle-photo-wrap {
    margin-bottom: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #f1f5f9;
    text-align: center;
    padding: 8px;
}

.guide-vehicle-photo {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    display: inline-block;
    object-fit: contain;
    border-radius: 6px;
}

/* ===== CONDITION CARD ===== */
.guide-condition-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.guide-condition-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

.guide-condition-info { flex: 1; }

.guide-condition-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 2px;
}

.guide-condition-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

/* Fuel bar */
.guide-fuel-bar-wrap { margin: 6px 0 4px; }

.guide-fuel-bar {
    height: 14px;
    background: #e5e7eb;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 4px;
}

.guide-fuel-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width .5s ease;
}

.guide-fuel-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
}

/* Confirm buttons */
.guide-confirm-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.guide-confirm-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-align: center;
}

.guide-confirm-buttons {
    display: flex;
    gap: 10px;
}

.guide-confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}

.guide-confirm-btn:hover { opacity: .85; }

.guide-confirm-yes {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

.guide-confirm-no {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

/* ===== VEHICLE FEATURES IN GUIDE ===== */
.guide-features-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guide-feature-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

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

.guide-feature-ico {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.guide-feature-txt {
    color: var(--text);
    line-height: 1.4;
}

/* ===== ΩΡΑΡΙΟ ===== */
.guide-hours-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.guide-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

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

.guide-hours-row:nth-child(even) { background: #f8fafc; }

.guide-hours-closed {
    color: #9ca3af;
}

.guide-hours-day {
    font-weight: 700;
    color: var(--primary);
    width: 36px;
    flex-shrink: 0;
}

.guide-hours-time {
    color: var(--text);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.guide-hours-closed .guide-hours-day,
.guide-hours-closed .guide-hours-time {
    color: #9ca3af;
}

/* ===== BOTTOM NAV (mobile app-like) ===== */
.guide-tabs-desktop { display: flex; }
.guide-bottom-nav   { display: none; }

@media (max-width: 700px) {
    .guide-tabs-desktop { display: none !important; }

    .guide-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,.08);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .guide-main { padding-bottom: 70px !important; }
}

.guide-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    transition: color .15s;
    font-size: inherit;
    font-family: inherit;
}

.guide-bnav-icon { font-size: 20px; line-height: 1; }
.guide-bnav-label { font-size: 10px; font-weight: 600; }

.guide-bnav-item.active {
    color: var(--primary, #1a3c5e);
}

.guide-bnav-item:active { opacity: .7; }

/* More panel */
.guide-more-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.guide-more-panel.open { display: block; }

.guide-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.4);
}

.guide-more-content {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}

.guide-more-handle {
    width: 40px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 8px auto 16px;
}

.guide-more-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    color: #1f2937;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}

.guide-more-item:last-child { border-bottom: none; }
.guide-more-item:active { background: #f8fafc; }

.guide-more-ico { font-size: 22px; width: 30px; text-align: center; }
.guide-more-arrow { margin-left: auto; color: #9ca3af; font-size: 20px; }

/* ===== CHECK-IN BUTTON ===== */
.guide-checkin-wrap {
    margin: 8px 0 4px;
    padding: 0;
}

.guide-checkin-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #1a3c5e;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    box-shadow: 0 4px 12px rgba(26,60,94,.25);
    transition: opacity .15s;
}

.guide-checkin-btn:active { opacity: .85; }

.guide-checkout-btn {
    background: #059669;
    box-shadow: 0 4px 12px rgba(5,150,105,.25);
}

.guide-checkin-hint {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 6px 0 0;
}

.guide-checkin-status {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    color: #16a34a;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.6;
}

.guide-checkin-status small {
    color: #6b7280;
    font-weight: 400;
    font-size: 13px;
}

/* ===== PIN SCREEN ===== */
.guide-pin-wrap {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    margin: 4px 0;
}

.guide-pin-title {
    font-size: 16px;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 4px;
}

.guide-pin-hint {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}
