/* ============================================================
   MENU BADGE
============================================================ */

.qm-menu-badge {
    background-color: #02457A;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
    display: inline-block;
    line-height: 1.4;
    min-width: 20px;
    text-align: center;
    vertical-align: middle;
}

.qm-menu-badge:empty,
.qm-menu-badge[style*="display: none"] {
    display: none !important;
}

/* ============================================================
   QUOTE LIST ITEMS
============================================================ */

:root {
    --rs-border: #E5E7EB;
    --rs-blue: #02457A;
    --rs-light-bg: #F3F3F3;
    --rs-danger: #FEE2E2;
}

.qm-item {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08) !important;
    padding: 28px 34px;
    margin-bottom: 35px;
    display: grid;
    grid-template-columns: 40px 220px 1fr 40px;
    column-gap: 24px;
    align-items: start;
}

.qm-check-col input {
    transform: scale(1.25);
    cursor: pointer;
    accent-color: #02457A;
}

.qm-select-item {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(208, 208, 208, 0.5) !important;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: #fff;
    transition: all 0.2s;
}

.qm-select-item:checked {
    background: #02457A;
    border-color: #02457A !important;
}

.qm-select-item:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.qm-select-item:hover {
    border-color: #02457A !important;
}

.qm-img-col img {
    width: 220px;
    border-radius: 12px !important;
    border: 2px solid rgba(208, 208, 208, 0.5) !important;
    padding: 12px;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.qm-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--rs-blue);
    margin-bottom: 8px;
}

.qm-category-pill {
    display: inline-block;
    background: var(--rs-light-bg);
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.qm-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    padding: 6px 18px;
    margin-bottom: 18px;
    gap: 8px;
}

.qm-qty-box button {
    background: none !important;
    border: none !important;
    font-size: 22px !important;
    color: var(--rs-blue) !important;
    padding: 0 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.qm-qty-val {
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    min-width: 50px;
    text-align: center;
    display: inline-block;
}

.qm-description {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 10px;
}

.qm-toggle-desc {
    all: unset !important;
    background: none !important;
    color: #02457A !important;
    font-weight: bold !important;
    font-size: 16px !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: inline-block !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.qm-toggle-desc:hover,
.qm-toggle-desc:active {
    color: #02457A !important;
    font-weight: bold !important;
    background: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.qm-divider {
    height: 1px;
    width: 100%;
    background: #E5E7EB;
    margin: 16px 0 20px;
}

.qm-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.qm-meta-col p {
    margin: 5px 0;
    font-size: 15px;
}

.qm-status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.qm-instock {
    background: #C9F5CD;
    color: #1A6A25;
}

.qm-backordered {
    background: #FFD6D6;
    color: #7A1C1C;
}

.qm-send-open-modal,
.qm-send-row button {
    all: unset !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #02457A !important;
    color: #fff !important;
    padding: 10px 28px !important;
    border-radius: 8px !important;
    border: 1px solid #02457A !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: 0.2s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.qm-send-open-modal:hover,
.qm-send-row button:hover {
    background: #02457AAC !important;
    border-color: #02457AAC !important;
}

.qm-send-open-modal:active,
.qm-send-row button:active {
    background: #02457AAc !important;
    border-color: #02457AAc !important;
}

.qm-send-row {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    padding-top: 20px !important;
    min-height: 50px;
}

.qm-remove-col button {
    background: transparent !important;
    color: #02457A !important;
    border: none !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 30px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transition: color 0.3s !important;
}

.qm-remove-col button:hover {
    color: #033a63 !important;
}

.qm-status-text {
    color: #02457A;
    font-weight: 500;
    padding-bottom: 25px;
}

.qm-footer-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#qm-clear-list {
    background: #D4D4D5;
    color: #000;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
}

#qm-clear-list:hover {
    background: #bfbfc0;
}

#qm-send-selected {
    background: #4DB6AC;
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
}

#qm-send-selected:hover {
    background: #3ba89e;
}

#qm-send-selected:disabled {
    background: #97d9d3;
    cursor: not-allowed;
}

.qm-response-banner {
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid #e5e5e5;
    padding: 18px 0;
    margin-bottom: 25px;
}

.qm-response-bar {
    width: 8px;
    height: 80px;
    background: #4DB6AC;
    margin-right: 18px;
}

.qm-response-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 25px;
}

.qm-response-title {
    font-size: 15px;
    color: black;
    font-weight: 500;
    padding: 0;
    margin: 0;
}

.qm-response-time {
    font-size: 28px;
    text-align: center !important;
    font-weight: 700;
    margin: 4px 0 0 0;
}

.qm-response-divider {
    width: 1px;
    height: 50px;
    background: #d8d8d8;
    margin-right: 25px;
}

.qm-response-right {
    font-size: 15px;
    color: black;
}

@media (max-width: 1024px) {
    .qm-item {
        grid-template-columns: 40px 180px 1fr 40px;
    }
    
    .qm-img-col img {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .qm-item {
        grid-template-columns: 40px 1fr 40px;
        gap: 15px;
    }
    
    .qm-img-col {
        grid-column: 2 / 3;
        margin: 15px auto;
    }
    
    .qm-img-col img {
        width: 160px;
    }
    
    .qm-info-col {
        grid-column: 1 / -1;
    }
    
    .qm-remove-col {
        align-self: flex-start;
        justify-self: end;
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }
    
    .qm-footer-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    #qm-clear-list,
    #qm-send-selected {
        width: 100%;
    }
}

/* ============================================================
   EMPTY STATE
============================================================ */

.qm-empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 60px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.qm-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.qm-empty-title {
    color: #02457A;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.qm-empty-text {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

.qm-empty-button {
    display: inline-block;
    background-color: #02457A;
    color: white !important;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-top: 25px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(2, 69, 122, 0.3);
}

.qm-empty-button:hover {
    background-color: #033a63;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 69, 122, 0.4);
    color: white !important;
    text-decoration: none;
}

/* ============================================================
   QUOTE MODAL STYLES
============================================================ */

#qm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.qm-modal-content {
    background-color: #D0D0D0 !important;
    padding: 50px;
    border-radius: 50px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qm-modal-close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.qm-modal-close:hover {
    color: #02457A;
}

.qm-modal-content h2 {
    color: #02457A;
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
}

.qm-modal-field {
    margin-bottom: 20px;
}

.qm-modal-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.qm-modal-field input[type="text"],
.qm-modal-field input[type="email"],
.qm-modal-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
    transition: box-shadow 0.3s;
}

.qm-modal-field input[type="text"]:focus,
.qm-modal-field input[type="email"]:focus,
.qm-modal-field textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #02457A;
}

.qm-modal-field textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.qm-field-error {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.qm-field-error:not(:empty) {
    display: block;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.qm-saved-check {
    color: #4caf50;
    font-weight: bold;
    margin-left: -45px;
    padding-left: 48px;
    animation: fadeIn 0.3s ease-in;
    display: inline-block;
    width: 16px;
    height: 18px;
    position: relative;
    vertical-align: middle;
}

.qm-saved-check::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 0px;
    width: 5px;
    height: 10px;
    border: solid #4caf50;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   CLEAR CONFIRMATION MODAL
============================================================ */

#qm-clear-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.qm-clear-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qm-clear-modal-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.qm-clear-modal-content p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.qm-clear-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.qm-clear-cancel-btn,
.qm-clear-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.qm-clear-cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.qm-clear-cancel-btn:hover {
    background-color: #d0d0d0;
}

.qm-clear-confirm-btn {
    background-color: #d32f2f;
    color: white;
}

.qm-clear-confirm-btn:hover {
    background-color: #b71c1c;
}

/* ============================================================
   REMOVE ITEM CONFIRMATION MODAL
============================================================ */

#qm-remove-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.qm-remove-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qm-remove-modal-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.qm-remove-modal-content p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.qm-remove-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.qm-remove-cancel-btn,
.qm-remove-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.qm-remove-cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.qm-remove-cancel-btn:hover {
    background-color: #d0d0d0;
}

.qm-remove-confirm-btn {
    background-color: #d32f2f;
    color: white;
}

.qm-remove-confirm-btn:hover {
    background-color: #b71c1c;
}

/* ============================================================
   SUCCESS NOTIFICATION (BOTTOM CENTER)
============================================================ */

.qm-success-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
    z-index: 10000;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.qm-success-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.qm-success-notification .qm-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.qm-modal-field input.qm-error,
.qm-modal-field textarea.qm-error {
    box-shadow: 0 0 0 2px #d32f2f;
}

.qm-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.qm-cancel-btn,
.qm-submit-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.qm-cancel-btn {
    background-color: transparent;
    color: #02457A;
    border: 2px solid transparent;
}

.qm-cancel-btn:hover {
    color: #033a63;
}

.qm-submit-btn {
    background-color: #02457A;
    color: #fff;
}

.qm-submit-btn:hover {
    background-color: #033a63;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 69, 122, 0.3);
}

.qm-submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 600px) {
    .qm-modal-content {
        padding: 30px 20px;
        border-radius: 30px;
    }
    
    .qm-modal-content h2 {
        font-size: 24px;
    }
    
    .qm-modal-buttons {
        flex-direction: column;
    }
    
    .qm-cancel-btn,
    .qm-submit-btn {
        width: 100%;
    }
}
