/* Note: Sidebar component archived in /archive/sidebar_component_archive.html */

/* Header Section */
.quote-sidebar-header {
    border-bottom: 1.5px solid rgba(194, 148, 36, 0.1);
    padding-bottom: 16px;
    margin: 0 24px 16px 24px;
    flex-shrink: 0;
}

.quote-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-sidebar-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-meta-edit {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 2px 4px;
}

.btn-meta-edit:hover {
    color: var(--primary-hover);
}

/* Scrollable Selected Items Area */
.quote-sidebar-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #fbfaf7;
}

/* Custom premium scrollbar for sidebar categories area */
.quote-sidebar-body::-webkit-scrollbar {
    width: 8px;
}
.quote-sidebar-body::-webkit-scrollbar-track {
    background: #fbfaf7;
    border-radius: 4px;
}
.quote-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    border: 2px solid #fbfaf7;
}
.quote-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Empty Summary State */
.quote-empty-msg {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 36px 12px;
    font-style: italic;
    border: 1.5px dashed var(--border-color);
    border-radius: 16px;
    background: #fbfaf7;
    margin: 0 24px;
}

/* Collapsible Quote Sections */
.quote-summary-section {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: #ffffff;
    overflow: hidden;
}

.quote-summary-section:first-child {
    border-top: 1px solid var(--border-color);
}

.quote-section-header {
    width: 100%;
    background: #fbfaf7;
    border: none;
    padding: 12px 24px; /* 24px horizontal padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.quote-section-header:hover {
    background: #f1f0eb;
}

.quote-section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-section-chevron {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.quote-summary-section.open .quote-section-chevron {
    transform: rotate(180deg);
}

.quote-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-section-subtotal {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy-blue);
}

.quote-section-content {
    display: none;
    padding: 12px 24px; /* 24px horizontal padding */
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    gap: 12px;
}

.quote-summary-section.open .quote-section-content {
    display: flex;
}

/* Summary Quote Items */
.quote-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(194, 148, 36, 0.1);
}

.quote-summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quote-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quote-item-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.quote-item-variant {
    font-size: 0.72rem;
    color: var(--primary-color);
    font-weight: 600;
}

.quote-item-qty-row {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quote-item-subtotal {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    min-width: 70px;
}

/* Mini Inline Quantity Adjuster for Sidebar */
.quote-qty-adjuster {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    height: 22px;
    background: #ffffff;
    margin-left: 4px;
}

.quote-qty-btn {
    background: transparent;
    border: none;
    width: 20px;
    height: 100%;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--navy-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-qty-btn:hover {
    background: #f1f0eb;
}

.quote-qty-val {
    font-size: 0.75rem;
    font-weight: 700;
    width: 26px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    outline: none;
    height: 100%;
    color: var(--text-primary);
}

.quote-qty-val::-webkit-outer-spin-button,
.quote-qty-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quote-qty-val[type=number] {
    -moz-appearance: textfield;
}

/* Sidebar Delete Button */
.btn-quote-remove {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-quote-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Alert/Highlight for last modified element */
@keyframes quote-item-highlight {
    0% { background-color: rgba(194, 148, 36, 0.15); }
    100% { background-color: transparent; }
}

.quote-highlight-flash {
    animation: quote-item-highlight 1s forwards;
}

/* Price Breakdown Section */
.quote-sidebar-footer {
    border-top: 1.5px solid rgba(194, 148, 36, 0.1);
    padding: 16px 24px 0 24px; /* Pad footer on sides */
    margin-top: 16px;
    flex-shrink: 0; /* Footer never shrinks */
}

.price-breakdown-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.breakdown-row.discount-row {
    color: #10b981;
}

.breakdown-row.total-row {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-blue);
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

.price-disclaimer {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 16px;
    text-align: center;
    background: #fbfaf7;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
}

/* Sidebar Validation Banner */
.quote-validation-banner {
    background-color: rgba(194, 148, 36, 0.06);
    border: 1px solid rgba(194, 148, 36, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.quote-validation-banner svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Sidebar Primary CTA Button */
.btn-sidebar-cta {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 18, 122, 0.15);
}

.btn-sidebar-cta.step-complete {
    background: linear-gradient(135deg, var(--navy-blue) 0%, #000c50 100%);
}

.btn-sidebar-cta.step-complete:hover {
    opacity: 0.95;
    box-shadow: 0 6px 18px rgba(0, 18, 122, 0.25);
}

.btn-sidebar-cta.step-incomplete {
    background: #dfdccf;
    color: var(--text-secondary);
    box-shadow: none;
    cursor: pointer;
}

.btn-sidebar-cta.step-incomplete:hover {
    background: #d0ccbf;
}

/* --- MOBILE WIDGET STYLING --- */

/* Mobile Bottom sticky bar */
.mobile-quote-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1.5px solid var(--border-color);
    padding: 14px 20px;
    z-index: 105;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 18, 122, 0.05);
    cursor: pointer;
    box-sizing: border-box;
}

.mobile-quote-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-quote-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-quote-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 18, 122, 0.08);
    color: var(--navy-blue);
    padding: 2px 8px;
    border-radius: 10px;
}

.mobile-quote-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-blue);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-quote-chevron {
    transition: transform 0.3s ease;
}

.mobile-quote-bar.open .mobile-quote-chevron {
    transform: rotate(180deg);
}

/* Mobile Slide up Bottom Drawer */
.mobile-quote-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 17, 40, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 110;
}

.mobile-quote-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 80vh;
    background: #ffffff;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    border-top: 1.5px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0, 18, 122, 0.15);
    z-index: 120;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 24px;
    box-sizing: border-box;
}

.mobile-quote-drawer.open {
    transform: translateY(0);
}

.mobile-quote-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid rgba(194, 148, 36, 0.1);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.mobile-quote-drawer-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy-blue);
}

.btn-close-drawer {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close-drawer:hover {
    background: #f1f0eb;
}

.mobile-quote-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
}

.mobile-quote-drawer-footer {
    border-top: 1.5px solid rgba(194, 148, 36, 0.1);
    padding-top: 16px;
}

/* Selected Arrangements Cards List (Step 1) */
.selected-arrangements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 24px;
}

.arrangement-selected-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 16px;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(194, 148, 36, 0.03);
}

.arrangement-card-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.arrangement-card-body {
    flex-grow: 1;
}

.arrangement-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 2px;
}

.arrangement-card-variant {
    font-size: 0.76rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 4px;
}

.arrangement-card-price {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.arrangement-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.btn-arrangement-details {
    background: transparent;
    border: none;
    color: var(--primary-color);
    padding: 4px 0;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-arrangement-details:hover {
    color: #b1882d;
    background: transparent;
}

.btn-arrangement-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    padding: 4px 0;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-arrangement-delete:hover {
    color: #dc2626;
    background: transparent;
}

.empty-arrangements-placeholder {
    text-align: center;
    background: #fbfaf7;
    border: 1.5px dashed var(--border-color);
    border-radius: 18px;
    padding: 32px 16px;
}

.empty-arrangements-placeholder p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 12px;
}

.btn-add-arrangements {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a1781b 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(194, 148, 36, 0.2);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-add-arrangements:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(194, 148, 36, 0.3);
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .quote-summary-sidebar,
    .mobile-quote-bar,
    .mobile-quote-drawer,
    .mobile-quote-drawer-overlay {
        display: none !important;
    }
}

.veg-badge {
    display: inline-flex;
    align-items: center;
    background-color: #ecfdf5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: fit-content;
}
