/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85); /* Stronger overlay for better focus */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #111111;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: modalScale 0.3s ease-out;
}

@keyframes modalScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    color: #FFD700;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: #ffffff;
}

/* Modal Content Layout (Simplified) */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header-centered {
    text-align: center;
    margin-bottom: 20px;
}

.modal-car-img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 10px;
}

.modal-title-mobile, .modal-form-title {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-align: center;
}

.modal-price {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
}

/* Form Styling */
.detail-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #FFD700;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.clean-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.clean-input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.05);
}

.clean-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.clean-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-gold-block {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: 8px;
    color: #000000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.form-feedback {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 215, 0, 0.1);
}

/* RTL Support */
[dir="rtl"] .close-modal {
    float: left;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .clean-input {
    text-align: right;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }
}
