.order-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.order-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.order-modal-close:hover { color: #E60012; }

.order-modal-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 15px;
    border: none;
    padding: 0;
}

#orderForm input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-field {
    margin-bottom: 0;
}

.form-field.invalid {
    margin-bottom: 4px;
}

.form-field.invalid input {
    border-color: #f44336;
}

.error-msg {
    display: none;
    color: #f44336;
    font-size: 12px;
    margin: 2px 0 8px 4px;
}

.form-field.invalid .error-msg {
    display: block;
}

#orderForm input:focus {
    outline: none;
    border-color: #E60012;
}

#orderForm button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #E60012 0%, #FF3B3B 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(230, 0, 18, 0.12);
    position: relative;
}

#orderForm button .btn-text {
    display: inline-block;
    transition: opacity 0.3s;
}

#orderForm button .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -10px 0 0 -10px;
}

#orderForm button.loading .btn-text {
    opacity: 0;
}

#orderForm button.loading .btn-loader {
    display: block;
}

#orderForm button.loading {
    pointer-events: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#orderForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(230, 0, 18, 0.2);
}

.order-summary {
    background: #F8F8F8;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}

.order-summary p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #1A1A1A;
}

.order-summary ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.order-summary li {
    margin: 4px 0;
    line-height: 1.4;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 12px;
}

.order-table th,
.order-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
}

.order-table thead th {
    background: #5a5959;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

.order-table tbody tr:hover {
    background: #fafafa;
}

.order-table .main-product td {
    font-weight: 600;
}

.order-table tfoot td {
    background: #fafafa;
    font-size: 13px;
    padding: 10px 8px;
    border-bottom: none;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
    text-align: center;
    width: 70px;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
    text-align: right;
    width: 100px;
}

.order-modal-message {
    margin-top: 16px;
}

.order-modal-message .success-message,
.order-modal-message .error-message {
    text-align: center;
    padding: 30px 20px;
    animation: fadeInUp 0.5s;
}

.order-modal-message .success-message svg,
.order-modal-message .error-message svg {
    margin-bottom: 15px;
    animation: scaleIn 0.5s;
}

.order-modal-message .success-message h3 {
    color: #4CAF50;
    font-size: 20px;
    margin: 10px 0;
}

.order-modal-message .error-message h3 {
    color: #f44336;
    font-size: 20px;
    margin: 10px 0;
}

.order-modal-message .success-message p,
.order-modal-message .error-message p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.success-message,
.error-message {
    text-align: center;
    padding: 30px 20px;
    animation: fadeInUp 0.5s;
}

.success-message svg,
.error-message svg {
    margin-bottom: 15px;
    animation: scaleIn 0.5s;
}

.success-message h3 {
    color: #4CAF50;
    font-size: 20px;
    margin: 10px 0;
}

.error-message h3 {
    color: #f44336;
    font-size: 20px;
    margin: 10px 0;
}

.success-message p,
.error-message p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
