/**
 * Quote Page Styles
 *
 * Styles for the draft quote page functionality.
 */

.wws-wq-quote-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wws-wq-quote-title {
    margin-bottom: 30px;
    font-size: 2em;
    color: #333;
}

/* Empty Quote State */
.wws-wq-empty-quote {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.wws-wq-empty-quote h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #666;
}

.wws-wq-empty-quote p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #888;
}

.wws-wq-empty-quote .button {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.wws-wq-empty-quote .button:hover {
    background: #005a87;
    color: white;
}

/* Access Denied */
.wws-wq-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px 0;
}

.wws-wq-access-denied h2 {
    color: #856404;
    margin-bottom: 15px;
}

.wws-wq-access-denied p {
    color: #856404;
    margin-bottom: 25px;
}

/* Quote Items Table */
.wws-wq-quote-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.wws-wq-quote-items th,
.wws-wq-quote-items td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.wws-wq-quote-items th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.wws-wq-quote-items tbody tr:hover {
    background: #f8f9fa;
}

.wws-wq-quote-items .product-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.wws-wq-quote-items .product-name {
    font-weight: 500;
    color: #333;
}

.wws-wq-quote-items .product-name a {
    color: #0073aa;
    text-decoration: none;
}

.wws-wq-quote-items .product-name a:hover {
    text-decoration: underline;
}

.wws-wq-quote-items .product-sku {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Quantity Input */
.wws-wq-quantity-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wws-wq-quantity-input input {
    width: 70px;
    height: 30px;
    text-align: center;
    padding: 0 5px;
    font-size: 14px;
}

.wws-wq-quantity-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 16px;
    font-weight: bold;
}

.wws-wq-quantity-btn:hover {
    background: #e0e0e0;
}

/* Price Display */
.wws-wq-price {
    font-weight: 500;
}

.wws-wq-price-wholesale {
    color: #28a745;
}

.wws-wq-price-retail {
    color: #6c757d;
    font-size: 0.9em;
    text-decoration: line-through;
}

.wws-wq-price-comparison {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Remove Button */
.wws-wq-remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

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

/* Quote Summary */
.wws-wq-quote-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.wws-wq-quote-summary h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.wws-wq-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.wws-wq-summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1em;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.wws-wq-summary-label {
    color: #666;
}

.wws-wq-summary-value {
    font-weight: 500;
}

/* Customer Information Form */
.wws-wq-customer-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.wws-wq-customer-form h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.wws-wq-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.wws-wq-form-field {
    flex: 1;
}

.wws-wq-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.wws-wq-form-field input,
.wws-wq-form-field select,
.wws-wq-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.wws-wq-form-field select:invalid,
.wws-wq-form-field input:invalid {
    color: #333;
    border-color: #ddd;
}

.wws-wq-form-field textarea {
    height: 100px;
    resize: vertical;
}

.wws-wq-form-field.required label::after {
    content: " *";
    color: #dc3545;
}

/* Action Buttons */
.wws-wq-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.wws-wq-actions-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.wws-wq-actions-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.wws-wq-btn {
    width: auto;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.wws-wq-btn-primary {
    background: #0073aa;
    color: white;
}

.wws-wq-btn-primary:hover {
    background: #005a87;
    color: white;
}

.wws-wq-btn-secondary {
    background: #6c757d;
    color: white;
}

.wws-wq-btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.wws-wq-btn-danger {
    background: #dc3545;
    color: white;
}

.wws-wq-btn-danger:hover {
    background: #c82333;
    color: white;
}

.wws-wq-btn-outline {
    background: transparent;
    border: 2px solid #0073aa;
    color: #0073aa;
    padding: 10px 22px; /* Reduced padding to compensate for 2px border */
}

.wws-wq-btn-outline:hover {
    background: #0073aa;
    color: white;
}

.wws-wq-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading States */
.wws-wq-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wws-wq-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wws-wq-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes wws-wq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.wws-wq-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wws-wq-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wws-wq-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wws-wq-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wws-wq-quote-page {
        padding: 15px;
    }

    .wws-wq-quote-items {
        font-size: 14px;
    }

    .wws-wq-quote-items th,
    .wws-wq-quote-items td {
        padding: 10px 8px;
    }

    .wws-wq-quote-items .product-thumbnail img {
        width: 40px;
        height: 40px;
    }

    .wws-wq-form-row {
        flex-direction: column;
        gap: 15px;
    }

    .wws-wq-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wws-wq-actions-left,
    .wws-wq-actions-right {
        justify-content: center;
    }

    .wws-wq-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wws-wq-quote-items {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .wws-wq-quote-items table {
        min-width: 600px;
    }
}
