/* Backorder Modal Overlay */
.backorder-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.backorder-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.backorder-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.backorder-modal-close:hover {
    color: #666;
}

/* Header Section */
.backorder-modal-header {
    margin-bottom: 30px;
}

.backorder-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.backorder-info-text {
    background-color: #f9f9f9;
    border-left: 4px solid #d0021b;
    padding: 15px;
    border-radius: 4px;
}

.backorder-info-text h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.backorder-info-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Product Info */
.backorder-product-info {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.backorder-info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

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

.backorder-info-row strong {
    color: #333;
    font-weight: 600;
}

.backorder-info-row span {
    color: #666;
    word-break: break-word;
}

.backorder-quantity-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    max-width: 150px;
}

.backorder-quantity-input:focus {
    outline: none;
    border-color: #d0021b;
    box-shadow: 0 0 0 2px rgba(208, 2, 27, 0.1);
}

/* Form Group */
.backorder-form-group {
    margin-bottom: 25px;
}

.backorder-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.backorder-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    resize: vertical;
    transition: border-color 0.2s;
}

.backorder-textarea:focus {
    outline: none;
    border-color: #d0021b;
    box-shadow: 0 0 0 2px rgba(208, 2, 27, 0.1);
}

/* Submit Button */
.backorder-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #d0021b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.2s;
}

.backorder-submit-btn:hover:not(:disabled) {
    background-color: #a70017;
    box-shadow: 0 4px 12px rgba(208, 2, 27, 0.3);
}

.backorder-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success Message */
.backorder-success-message {
    text-align: center;
    padding: 30px 20px;
}

.backorder-success-message p {
    font-size: 16px;
    color: #27ae60;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
    .backorder-modal-content {
        padding: 25px;
        width: 95%;
    }

    .backorder-modal-header h2 {
        font-size: 16px;
    }

    .backorder-info-row {
        grid-template-columns: 80px 1fr;
        gap: 10px;
        font-size: 13px;
    }

    .backorder-info-text p {
        font-size: 12px;
    }
}