/**
 * Quote Request Styles
 */

/* Modal Overlay */
.wc-api-sync-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Modal Container */
.wc-api-sync-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal Content */
.wc-api-sync-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

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

/* Modal Header */
.wc-api-sync-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.wc-api-sync-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* Modal Close Button */
.wc-api-sync-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wc-api-sync-modal-close:hover {
    color: #333;
}

/* Quote Form */
.wc-api-sync-quote-form {
    padding: 20px;
}

/* Form Group */
.wc-api-sync-form-group {
    margin-bottom: 20px;
}

.wc-api-sync-form-group:last-of-type {
    margin-bottom: 0;
}

/* Form Labels */
.wc-api-sync-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wc-api-sync-form-group label .required {
    color: #dc3545;
}

/* Form Controls */
.wc-api-sync-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wc-api-sync-form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.wc-api-sync-form-control:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.wc-api-sync-form-control[readonly] {
    background-color: #f5f5f5;
    color: #666;
}

/* Textarea */
textarea.wc-api-sync-form-control {
    resize: vertical;
    min-height: 120px;
}

/* Form Buttons */
.wc-api-sync-quote-submit,
.wc-api-sync-quote-cancel {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin-right: 10px;
}

.wc-api-sync-quote-submit {
    background-color: #0073aa;
    color: white;
}

.wc-api-sync-quote-submit:hover:not(:disabled) {
    background-color: #005a87;
}

.wc-api-sync-quote-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wc-api-sync-quote-cancel {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.wc-api-sync-quote-cancel:hover {
    background-color: #efefef;
}

/* Form Message */
.wc-api-sync-form-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.wc-api-sync-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-api-sync-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 600px) {
    .wc-api-sync-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .wc-api-sync-modal-header {
        padding: 15px;
    }

    .wc-api-sync-modal-header h2 {
        font-size: 20px;
    }

    .wc-api-sync-quote-form {
        padding: 15px;
    }

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

    .wc-api-sync-quote-submit,
    .wc-api-sync-quote-cancel {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .wc-api-sync-quote-cancel {
        margin-bottom: 0;
    }
}

/* Accessibility */
.wc-api-sync-form-control:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading State */
.wc-api-sync-quote-submit.loading {
    position: relative;
    color: transparent;
}

.wc-api-sync-quote-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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