/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
}

.modal {
    background-color: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    margin: 0 15px;
}

#carRequestModal {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#carRequestModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

#carRequestModal .modal-header h3 {
    margin: 0;
    padding-right: 2rem;
}

#carRequestModal .modal-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    min-width: 32px;
    height: 32px;
    margin: -0.5rem -0.5rem 0 0;
}

#carRequestModal .close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#carRequestModal .close-btn:hover {
    background-color: #e5e5e5;
}

#carRequestModal .close-btn img {
    width: 16px;
    height: 16px;
    display: block;
}

#carRequestModal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

#carRequestModal .modal-body > .mb-4 {
    padding: 1rem;
    border-radius: 4px;
}

/* Form elements styling now use the global styles from main.css */

.modal.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .modal {
        max-width: calc(100% - 30px);
        margin: 0 15px;
    }
}

/* Modal padding adjustments */
.modal .px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.modal .py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

@media (min-width: 768px) {
    .modal .px-5-md {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Hint box adjustment */
.modal .bg-very-light-gray {
    padding: 0.75rem !important;
    font-size: 0.9rem;
}

.modal .bg-very-light-gray p {
    margin-bottom: 0.5rem !important;
}

.modal .bg-very-light-gray p:last-child {
    margin-bottom: 0 !important;
}

/* Title adjustment */
.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem !important;
}

/* Description text adjustment */
.modal .mb-4 p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.modal .mb-4 {
    margin-bottom: 1rem !important;
}

/* Submit button adjustment */
.modal .button-red {
    padding: 0.5rem 1.5rem !important;
    font-size: 0.95rem !important;
}

@media (max-width: 768px) {
    .modal {
        max-width: calc(100% - 30px);
        margin: 0 15px;
    }
}