/* Force Custom Styles for Quote Form - Exact Match */

/* Container */
#qs-quote-form-wrapper.qs-inline-form {
    margin-top: 30px;
    padding: 0;
    background: transparent;
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Heading */
#qs-quote-form-wrapper h3 {
    color: #0d3b28;
    /* Dark Green */
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* Grid Layout */
.qs-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    /* Increased gap */
}

.qs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.qs-form-row {
    margin-bottom: 25px;
}

/* Inputs & Selects - The Specific Look */
#qs-quote-form-wrapper input[type="text"],
#qs-quote-form-wrapper input[type="number"],
#qs-quote-form-wrapper input[type="email"],
#qs-quote-form-wrapper select {
    width: 100%;
    padding: 16px 24px;
    /* Generous padding */
    background-color: #F5F7FA !important;
    /* The specific light blue-grey */
    border: 1px solid transparent !important;
    border-radius: 16px !important;
    /* More rounded */
    font-size: 15px;
    color: #4a5568;
    box-shadow: none !important;
    outline: none;
    transition: all 0.2s ease;
    height: auto !important;
    line-height: normal;
    -webkit-appearance: none;
    /* Remove default styling */
    appearance: none;
}

/* Placeholder Color */
#qs-quote-form-wrapper input::placeholder {
    color: #718096;
    /* Darker placeholder */
}

/* Focus State */
#qs-quote-form-wrapper input:focus,
#qs-quote-form-wrapper select:focus {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Select Dropdown Arrow */
#qs-quote-form-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    padding-right: 45px;
}

/* File Upload */
.qs-file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.qs-form-message {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.qs-form-message.is-success,
.qs-form-message.is-error {
    display: block;
}

.qs-form-message.is-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.qs-form-message.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.qs-file-upload-label {
    font-size: 16px;
    color: #1a202c;
    font-weight: 500;
    min-width: 130px;
}

/* Submit Button */
#qs-submit-quote {
    display: inline-block;
    background-color: #1F6B53 !important;
    /* Exact Green from screenshot */
    color: #ffffff !important;
    padding: 16px 48px;
    border-radius: 100px !important;
    /* Full Pill */
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-transform: none;
    transition: transform 0.1s ease, background-color 0.2s ease;
    width: auto;
}

#qs-submit-quote:hover {
    background-color: #185642 !important;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .qs-grid-3 {
        grid-template-columns: 1fr;
    }

    .qs-grid-2 {
        grid-template-columns: 1fr;
    }

    .qs-file-upload-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Modern Dashboard Styles */
.qs-dashboard {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif;
}

.qs-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}

.qs-dashboard h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.qs-message-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.qs-quote-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
}

.qs-quote-table th {
    padding: 16px;
    background-color: #f8fafc;
    color: #718096;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #edf2f7;
    text-align: left;
}

.qs-quote-table td {
    padding: 16px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    color: #4a5568;
    font-size: 14px;
    transition: background-color 0.2s;
}

.qs-quote-table tr:hover td {
    background-color: #f7fafc;
}

.qs-quote-table tr:last-child td {
    border-bottom: none;
}

.qs-cart-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: 18px;
    gap: 18px;
    flex-wrap: wrap;
}

.qs-cart-message {
    margin: 0 0 16px 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.qs-cart-message.is-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.qs-cart-message.is-error {
    background: #fff5f5;
    color: #9b2c2c;
    border: 1px solid #feb2b2;
}

.qs-guest-details-form {
    width: 100%;
}

.qs-guest-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin-bottom: 16px;
}

.qs-guest-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.qs-guest-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #2d3748;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.qs-guest-field input:focus {
    outline: none;
    border-color: #0f6b4a;
    box-shadow: 0 0 0 3px rgba(15, 107, 74, 0.15);
}

.qs-cart-footer .button,
.qs-cart-footer .button.alt {
    background-color: #0f6b4a !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 22px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 16px rgba(15, 107, 74, 0.2) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.qs-cart-footer .button:hover,
.qs-cart-footer .button.alt:hover {
    background-color: #0b5b3f !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 107, 74, 0.25) !important;
}

.qs-cart-footer .button:focus,
.qs-cart-footer .button.alt:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(15, 107, 74, 0.2) !important;
}

/* List View Image */
.qs-list-image img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qs-list-product-name {
    font-weight: 500;
    color: #2d3748;
}

/* Status Badges */
.qs-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.qs-status-pending {
    background-color: #fffaf0;
    color: #ed8936;
    border: 1px solid #fbd38d;
}

.qs-status-quoted {
    background-color: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

/* Action Buttons */
.qs-action-buttons {
    display: flex;
    gap: 10px;
}

.qs-view-btn {
    background-color: transparent !important;
    color: #3182ce !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}

.qs-view-btn:hover {
    background-color: #3182ce !important;
    color: #ffffff !important;
    border-color: #3182ce !important;
}

.qs-delete-btn {
    background-color: transparent !important;
    color: #e53e3e !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}

.qs-delete-btn:hover {
    background-color: #e53e3e !important;
    color: #ffffff !important;
    border-color: #e53e3e !important;
}

/* Single View Refinements */
.qs-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.qs-spec-item {
    font-size: 14px;
    color: #666;
}

.qs-spec-item strong {
    color: #333;
}

.qs-back-btn {
    background-color: #718096 !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
}

.qs-single-quote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.qs-header-title h2 {
    margin: 4px 0 0 0;
    font-size: 20px;
    color: #1a202c;
}

.qs-header-kicker {
    margin: 0;
    color: #16a34a;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.qs-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qs-edit-toggle {
    background: #1F6B53 !important;
    border: 1px solid #1F6B53 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.qs-edit-toggle:hover {
    background: #185642 !important;
    border-color: #185642 !important;
}

.qs-edit-input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #2d3748;
}

.qs-edit-input[readonly],
.qs-edit-textarea[readonly],
.qs-qty-input[readonly] {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #4a5568;
}

.qs-edit-input:focus {
    outline: none;
    border-color: #90cdf4;
    box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.35);
}

.qs-edit-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #2d3748;
}

.qs-quote-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qs-edit-toggle {
    background: #edf2f7 !important;
    border: 1px solid #e2e8f0 !important;
    color: #2d3748 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.qs-save-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.qs-quote-edit-actions {
    margin-top: 16px;
    text-align: right;
}

/* Mini Cart Wrapper */
.qs-mini-cart-wrapper {
    position: static;
    display: inline-block;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
}

/* Cart Icon Button */
.qs-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background-color: transparent !important;
    color: #1F6B53;
    border-radius: 50%;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none !important;
    outline: none;
    position: relative;
}

.qs-cart-icon:hover {
    background-color: #f8fafc;
    transform: none;
    box-shadow: none;
}

.qs-cart-icon:focus,
.qs-cart-icon:active {
    outline: none;
    box-shadow: none;
}

.qs-cart-icon svg {
    stroke: #1F6B53;
}

.qs-cart-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    line-height: 28px;
}

/* Cart Count Badge */
.qs-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e53e3e;
    /* Red */
    color: white;
    font-size: 12px;
    font-weight: bold;
    height: 24px;
    width: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Dropdown Menu */
.qs-mini-cart-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 360px;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    padding: 22px;
    border-left: none;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    visibility: visible;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
}

.qs-mini-cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2147483646;
}

.qs-mini-cart-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Open State */
.qs-mini-cart-dropdown.is-open {
    transform: translateX(0);
}

/* Cart Header */
.qs-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}

.qs-mini-cart-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* Cart List */
.qs-cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow-y: auto;
    flex: 1 1 auto;
}

.qs-cart-actions {
    margin-top: auto;
    padding-top: 14px;
}

.qs-cart-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f7fafc;
}

.qs-cart-list li:last-child {
    border-bottom: none;
}

.qs-cart-item-img img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.qs-cart-item-details h4 {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.qs-cart-item-details p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* Actions */
.qs-cart-actions {
    margin-top: 15px;
    text-align: center;
}

.qs-view-cart-btn {
    display: inline-block;
    width: 100%;
    background-color: #1F6B53 !important;
    color: #ffffff !important;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.qs-view-cart-btn:hover {
    background-color: #164e3c !important;
}

/* Empty State */
.qs-empty-mini-cart {
    text-align: center;
    padding: 20px 0;
    color: #718096;
}

.qs-mini-cart-dropdown .qs-empty-mini-cart {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    text-align: center;
    gap: 10px;
}

/* Modal Default State */
#qs-quote-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 9999;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}

/* Ensure body scrolls */
body.qs-modal-open {
    overflow: hidden;
}
