/* WooCommerce Quote System - Frontend Styles */

/* =========================================
   QUOTE FORM
   ========================================= */
.wqs-quote-form-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.wqs-quote-form-wrap h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.wqs-quote-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Cart Summary */
.wqs-cart-summary {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 30px;
}

.wqs-cart-summary h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

.wqs-cart-items { list-style: none; margin: 0; padding: 0; }
.wqs-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.wqs-cart-item:last-child { border-bottom: none; }

.wqs-item-image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.wqs-item-image-placeholder {
    width: 50px; height: 50px;
    background: #eee;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    color: #aaa; font-size: 20px;
}
.wqs-item-name { flex: 1; font-weight: 500; }
.wqs-item-sku  { font-size: 12px; color: #888; }
.wqs-item-qty  { color: #666; font-size: 14px; white-space: nowrap; }

/* Form Fields */
.wqs-form { margin-top: 10px; }

.wqs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.wqs-form-row.full { grid-template-columns: 1fr; }

.wqs-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}
.wqs-field label .required { color: #e00; margin-left: 2px; }

.wqs-field input,
.wqs-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.wqs-field input:focus,
.wqs-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
}
.wqs-field textarea { min-height: 100px; resize: vertical; }

/* Error state */
.wqs-field.has-error input,
.wqs-field.has-error textarea { border-color: #e00; }
.wqs-field-error { color: #e00; font-size: 12px; margin-top: 4px; }

/* Submit Button */
.wqs-submit-wrap { margin-top: 24px; text-align: center; }
.wqs-submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 200px;
}
.wqs-submit-btn:hover { background: #005f8a; }
.wqs-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Loading spinner */
.wqs-submit-btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wqs-spin 0.7s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes wqs-spin { to { transform: rotate(360deg); } }

/* Error notice */
.wqs-notice-error {
    background: #fff5f5;
    border-left: 4px solid #e00;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    display: none;
}
.wqs-notice-error.visible { display: block; }

/* =========================================
   SUCCESS PAGE
   ========================================= */
.wqs-success-wrap {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}
.wqs-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.wqs-success-wrap h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}
.wqs-success-message {
    color: #555;
    font-size: 16px;
    margin-bottom: 30px;
}
.wqs-success-details {
    background: #f5f9ff;
    border: 1px solid #d0e4f7;
    border-radius: 8px;
    padding: 20px 28px;
    text-align: left;
    margin-bottom: 30px;
}
.wqs-success-details table { width: 100%; border-collapse: collapse; }
.wqs-success-details td { padding: 8px 0; border-bottom: 1px solid #e5eef8; font-size: 14px; }
.wqs-success-details td:first-child { font-weight: 600; width: 140px; color: #555; }
.wqs-success-details tr:last-child td { border-bottom: none; }

.wqs-quote-number-badge {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .wqs-form-row { grid-template-columns: 1fr; }
    .wqs-quote-form-wrap { padding: 0 12px 30px; }
}
