/**
 * Quote System Styles
 * Modern, responsive UI/UX for quote request system
 */

:root {
    --primary-color: #0073aa;
    --primary-dark: #005a87;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-light: #666;
}

/* Quote Page Wrapper */
.wc-api-sync-quote-page-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.wc-api-sync-quote-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wc-api-sync-quote-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.wc-api-sync-quote-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.wc-api-sync-quote-header .subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

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

.wc-api-sync-form-section {
    margin-bottom: 40px;
}

.wc-api-sync-form-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.wc-api-sync-form-section:last-of-type {
    margin-bottom: 30px;
}

/* Form Rows and Groups */
.wc-api-sync-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wc-api-sync-form-row.full {
    grid-template-columns: 1fr;
}

.wc-api-sync-form-group {
    display: flex;
    flex-direction: column;
}

.wc-api-sync-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 14px;
}

.wc-api-sync-form-group label .required {
    color: var(--danger-color);
    margin-left: 4px;
}

.wc-api-sync-form-control {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

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

.wc-api-sync-form-control:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
}

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

/* Quote Items Container */
.quote-items-container {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.quote-item-row {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

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

.quote-item-row .wc-api-sync-form-row {
    margin-bottom: 0;
}

.quote-item-row .wc-api-sync-form-group:last-child {
    justify-content: flex-end;
}

/* Buttons */
.btn-remove-item {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-remove-item:hover {
    background: #c82333;
}

#btn-add-item {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

#btn-add-item:hover {
    background: var(--primary-dark);
}

/* Form Actions */
.wc-api-sync-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.wc-api-sync-form-actions .button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wc-api-sync-form-actions .button-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.wc-api-sync-form-actions .button-primary:hover {
    background: var(--primary-dark);
}

.wc-api-sync-form-actions .button-secondary {
    background: var(--light-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.wc-api-sync-form-actions .button-secondary:hover {
    background: #e9ecef;
}

.button-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form Messages */
.wc-api-sync-form-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
}

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

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

.wc-api-sync-form-message strong {
    font-weight: 600;
}

/* Quote Notice */
.wc-api-sync-quote-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #856404;
}

.wc-api-sync-quote-notice p {
    margin: 0;
}

.wc-api-sync-quote-notice a {
    color: #0073aa;
    font-weight: 600;
}

/* Price Hidden */
.price-hidden {
    display: inline-block;
    padding: 8px 12px;
    background: var(--light-gray);
    border-radius: 4px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-api-sync-quote-page-wrapper {
        padding: 20px 10px;
    }

    .wc-api-sync-quote-container {
        border-radius: 8px;
    }

    .wc-api-sync-quote-header {
        padding: 30px 20px;
    }

    .wc-api-sync-quote-header h1 {
        font-size: 24px;
    }

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

    .wc-api-sync-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wc-api-sync-form-actions {
        grid-template-columns: 1fr;
    }

    .quote-item-row {
        padding: 15px;
    }

    .quote-item-row .wc-api-sync-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wc-api-sync-quote-header h1 {
        font-size: 20px;
    }

    .wc-api-sync-quote-header .subtitle {
        font-size: 14px;
    }

    .wc-api-sync-form-section h3 {
        font-size: 18px;
    }

    .wc-api-sync-form-control {
        font-size: 16px;
        padding: 12px;
    }

    .wc-api-sync-form-actions .button {
        padding: 12px 20px;
        font-size: 14px;
    }
}
