/* Public Site Styles - Mobile First, RTL Support */

/* Font Family */
body, html {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rtl-body {
    text-align: right;
}

/* Layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    padding: 2rem 1rem;
    color: white;
    text-align: center;
}

.hero-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-section p {
    font-size: 1rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 3rem 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.25rem;
    }
}

/* Search Card */
.search-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .search-card {
        padding: 2rem;
        margin-top: -3rem;
    }
}

/* Form Controls */
.form-control, .form-select {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Input with icon */
.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
}

.rtl-body .input-group-text {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.rtl-body .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Buttons */
.btn-search {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.btn-clear {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 1.5rem;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    padding: 1rem 1.5rem;
}

.result-header h5 {
    margin: 0;
    font-weight: 600;
}

.result-body {
    padding: 1.5rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.1rem;
    color: #212529;
    font-weight: 500;
}

.result-value.no-data {
    color: #adb5bd;
    font-style: italic;
}

@media (min-width: 768px) {
    .result-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .result-label {
        margin-bottom: 0;
    }
}

/* Not Found Card */
.not-found-card {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-top: 1.5rem;
    animation: slideUp 0.3s ease;
}

.not-found-card i {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
}

.not-found-card p {
    color: #856404;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Rate Limit Warning */
.rate-limit-card {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-top: 1.5rem;
    animation: slideUp 0.3s ease;
}

.rate-limit-card i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.rate-limit-card p {
    color: #842029;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Rate Limit Badge */
.rate-limit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e7f1ff;
    color: #0d6efd;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Validation */
.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

/* Custom Select with Datalist styling */
.plate-code-input {
    position: relative;
}

/* Loading spinner */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    z-index: 100;
}

/* Footer */
.footer {
    margin-top: auto;
}

/* Plate number display styling */
.plate-display {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: inline-block;
    border: 3px solid #ffc107;
}

/* Carousel Styles for Results */
.carousel {
    margin-top: 1.5rem;
    position: relative;
}

.carousel-inner {
    overflow: hidden;
}

.carousel-item {
    transition: transform 0.4s ease-in-out;
}

/* Hide default carousel controls */
.carousel-control-prev,
.carousel-control-next {
    display: none;
}

/* Custom navigation buttons in header */
.carousel-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.carousel-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.carousel-nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

.carousel-nav-btn i {
    font-size: 1rem;
}

/* RTL adjustments for carousel nav buttons */
.rtl-body .carousel-nav-btn .bi-chevron-left {
    transform: scaleX(-1);
}

.rtl-body .carousel-nav-btn .bi-chevron-right {
    transform: scaleX(-1);
}

/* Carousel indicators - override Bootstrap defaults */
#resultsCarousel .carousel-indicators {
    position: static;
    display: flex;
    justify-content: center;
    margin: 1rem 0 0 0;
    padding: 0;
}

#resultsCarousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #dee2e6;
    border: none;
    margin: 0 5px;
    padding: 0;
    opacity: 1;
}

#resultsCarousel .carousel-indicators button.active {
    background-color: #198754;
}
