/* ================================================
   RENTAL MODAL STYLES
   CSS cho modal đặt thuê xe máy
   ================================================ */

/* Modal Overlay */
.rental-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content Container */
.rental-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.rental-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rental-modal-title {
    margin: 0;
    color: #dd3333;
    font-size: 24px;
    font-weight: 700;
}

.rental-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.rental-modal-close:hover,
.rental-modal-close:focus {
    color: #000;
}

/* Modal Info Section */
.rental-modal-info {
    margin-bottom: 20px;
}

.rental-modal-motorcycle-name {
    color: #000;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rental-modal-motorcycle-price {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Form Styles */
.rental-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #dd3333;
}

/* Form Section */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #dd3333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dd3333;
}

.required {
    color: #dd3333;
    font-weight: bold;
}

/* File Input Styles */
.form-input-file {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-input-file:focus {
    outline: none;
    border-color: #dd3333;
}

.form-input-file::-webkit-file-upload-button {
    padding: 8px 15px;
    background-color: #dd3333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.form-input-file::-webkit-file-upload-button:hover {
    background-color: #bb2222;
}

/* Image Preview */
.image-preview {
    margin-top: 10px;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    background-color: #f9f9f9;
}

.image-preview.has-image {
    display: block;
}

/* Price Summary */
.price-summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #dd3333;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-label {
    color: #666;
    font-size: 15px;
}

.price-value {
    font-weight: 600;
    color: #000;
    font-size: 16px;
}

.deposit-amount {
    font-weight: 700;
    color: #dd3333;
    font-size: 18px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-cancel {
    background-color: #999;
    color: white;
}

.btn-cancel:hover {
    background-color: #777;
}

.btn-submit {
    background-color: #dd3333;
    color: white;
}

.btn-submit:hover {
    background-color: #bb2222;
}

/* Motorcycle Grid Styles */
.motorcycle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.motorcycle-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 320px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.motorcycle-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.motorcycle-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}

.motorcycle-name {
    color: #000000;
    font-weight: 600;
    font-size: 16px;
    margin: 10px 0;
    line-height: 1.3;
}

.motorcycle-price {
    background: #ff0000;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .motorcycle-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .motorcycle-item {
        height: 300px;
    }

    .rental-modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 768px) {
    .motorcycle-grid {
        grid-template-columns: 1fr;
    }

    .motorcycle-item {
        height: 280px;
    }

    .rental-modal-content {
        margin: 5% auto;
        padding: 20px;
        max-height: 95vh;
    }

    .rental-modal-title {
        font-size: 20px;
    }

    .form-section-title {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rental-modal-content {
        margin: 20% auto;
        padding: 15px;
    }

    .rental-modal-title {
        font-size: 18px;
    }

    .rental-modal-close {
        font-size: 24px;
    }
}
