/**
 * Quote System Styles
 * Slideout panel and quote management UI
 */

/* Quote Success Popup Styles */
#quote-success-popup .popup-header svg circle {
    fill: #e1001b;
}

.quote-popup-items {
    margin-bottom: 20px;
}

.quote-popup-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.quote-popup-item h4 {
    margin: 0 0 10px 0;
    color: #000322;
    font-size: 16px;
    font-weight: 600;
}

.quote-popup-item-details {
    display: grid;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #000322;
}

.quote-popup-totals {
    border-top: 2px solid #e1001b;
    padding-top: 15px;
}

.quote-popup-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.quote-popup-row.quote-popup-total {
    border-top: 2px solid #e1001b;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.quote-popup-row .label {
    color: #fff;
}

.quote-popup-row .value {
    font-weight: 600;
    color: #fff;
}

.quote-popup-total .label,
.quote-popup-total .value {
    color: #fff;
}

/* Quote Button in Menu/Header */
button.quote-toggle-btn {
    padding: 0px !important;
}

button.quote-toggle-btn:hover, button.quote-toggle-btn:focus {
    background: none;
}

.quote-toggle-btn svg {
    width: 30px;
    height: 30px;
}

.quote-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e1001b;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 0;
}


@media (max-width: 767px) {
.quote-count-badge {
top: 4px
}

button.quote-toggle-btn {
    margin-top: 11px;
}
}

/* Quote Slideout Overlay */
.quote-slideout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 2, 20, 0.7);
    z-index: 9998;
    display: none;
}

/* Customer Details Header with Edit Button */
.customer-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.customer-details-header h4 {
    margin: 0;
}

/* Edit Customer Popup */
.edit-customer-popup-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: unset;
}

.edit-customer-popup-content h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #fff;
    font-family: 'Montserrat';
    font-weight: 600;
}

.edit-customer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.edit-customer-fields .form-group.full {
    grid-column: 1 / -1;
}

.edit-customer-fields .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.edit-customer-fields .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.edit-customer-fields .form-group input:focus {
    outline: none;
    border-color: #e1001b;
}

.edit-customer-fields .required {
    color: #e1001b;
}

.cancel-edit-customer-btn {
    background: #1a1c38 !important;
}

.save-customer-btn {
    background: #e1001b !important;
    color: #fff;
}

.save-customer-btn:hover {
    background: #c00016;
}

/* Quote Slideout Panel */
.quote-slideout {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.quote-slideout.active {
    right: 0;
}

/* Quote Header */
.quote-slideout-header {
    background: #000214;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #e1001b;
}

.quote-slideout-header h3 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.quote-slideout-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.quote-slideout-close:hover {
    opacity: 0.7;
    background: none;
}

.quote-slideout-close svg {
    width: 24px;
    height: 24px;
}

/* Quote Content */
.quote-slideout-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Empty State */
.quote-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.quote-empty p {
    margin: 10px 0;
    font-size: 16px;
}

.quote-empty p:first-child {
    font-size: 20px;
    font-weight: 600;
    color: #000214;
}

/* Quote Items List */
.quote-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Individual Quote Item - Compact Design */
.quote-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.quote-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quote-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
}

.quote-item-main {
    flex: 1;
}

.quote-item-main h5 {
    margin: 0 0 8px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000214;
}

.quote-item-main h5 .item-variation {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.quote-item-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000322;
    font-weight: 600;
}

.item-separator {
    color: #e1001b;
    font-weight: 700;
}

.quote-item-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: solid 1px #ddd;
    margin-top: 0;
}

.quote-item-total-display .total-label {
    font-size: 14px;
    font-weight: 600;
    color: #000322;
}

.quote-item-total-display .total-value {
    font-size: 18px;
    font-weight: 700;
    color: #000322;
}

.quote-item-recurring-display {
    padding: 0 16px 12px;
    display: flex;
    justify-content: space-between;
}

.recurring-label {
    font-size: 14px;
    font-weight: 600;
    color: #000322;
}

.recurring-value {
    font-size: 18px;
    font-weight: 700;
    color: #000322;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.recurring-every {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-left: 5px;
}

.remove-quote-item {
    background: none;
    border: none;
    color: #000738;
    padding: 0px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.remove-quote-item:hover {
    opacity: 0.7;
}

/* Quote Item Accordion */
.quote-item-accordion {
    border-top: 1px solid #e0e0e0;
}

.quote-item-toggle {
    width: 100% !important;
    background: #f8f9fa !important;
    padding: 12px 16px !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #000214 !important;
}

.quote-item-toggle:hover {
    background: #e9ecef;
}

.quote-item-toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.quote-item-accordion.active .quote-item-toggle svg {
    transform: rotate(180deg);
}

.quote-item-breakdown {
    display: none;
    padding: 16px;
    background: #fff;
}

.quote-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.quote-item-breakdown .quote-breakdown-row .label {
   color: #000322;
    font-weight: 500; 
}

.quote-item-breakdown .quote-breakdown-row .value {
color: #000322;
font-weight: 500; 
}

.quote-breakdown-row .label {
    color: #fff;
    font-weight: 500;
}

.quote-breakdown-row .value {
    color: #fff;
    font-weight: 600;
}

.quote-breakdown-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #e0e0e0;
    font-size: 15px;
}

.quote-breakdown-row.total .label,
.quote-breakdown-row.total .value {
    color: #e1001b;
    font-weight: 700;
}

/* Quote Footer */
.quote-footer {
    background: #000214;
    border-top: 3px solid #e1001b;
    padding: 24px;
}

/* Quote Footer Summary Container */
.quote-footer-summary {
    background: #000214;
    margin-bottom: 20px;
}

/* Customer Details Section in Footer */
.quote-customer-section {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-customer-section h4 {
    margin: 0 0 16px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.quote-customer-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 13px;
    gap: 16px;
}

.customer-detail-row .label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    min-width: 70px;
    flex-shrink: 0;
}

.customer-detail-row .value {
    color: #fff;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Customer Details Accordion */
.quote-customer-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-customer-toggle {
    width: 100% !important;
    background: transparent;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    color: #fff !important;
    padding: 20px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.quote-customer-toggle:hover {
    background: transparent !important;
    opacity: 0.8;
}

.quote-customer-toggle:focus {
    background: transparent !important;
}

.quote-customer-toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    stroke: #fff;
}

.quote-customer-accordion.active .quote-customer-toggle svg {
    transform: rotate(180deg);
}

.quote-customer-content {
    display: none;
    padding: 0 0 20px 0;
}

.quote-customer-content .edit-customer-btn {
    width: 100%;
    margin-top: 16px;
    padding: 10px;
    background: #e1001b;
    border: 1px solid #e1001b;
    color: #fff !important;
    border-radius: 99px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-customer-content .edit-customer-btn:hover {
   background: rgba(225, 0, 27, 0.7);
    border-color: rgba(225, 0, 27, 0.7);
}

/* Quote Breakdown Accordion */
.quote-breakdown-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-breakdown-toggle {
    width: 100% !important;
    background: transparent;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    color: #fff !important;
    padding: 20px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.quote-breakdown-toggle:hover {
    background: transparent !important;
    opacity: 0.8;
}

.quote-breakdown-toggle:focus {
    background: transparent !important;
}

.quote-breakdown-toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    stroke: #fff;
}

.quote-breakdown-accordion.active .quote-breakdown-toggle svg {
    transform: rotate(180deg);
}

.quote-breakdown-content {
    display: none;
    padding: 0;
}

/* Quote Total Row */
.quote-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0 0;
}

.quote-total-row .label {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.quote-total-row .value {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

/* Quote Actions */
.quote-actions {
    display: flex;
    gap: 12px;
}

/* Empty state - single centered button */
.quote-actions-empty {
    display: none;
    justify-content: center;
    width: 100%;
}

.start-quote-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #e1001b !important;
    color: #fff !important;
    border: none;
    border-radius: 99px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
}

.start-quote-btn:hover {
    background: #c1001b !important;
    color: #fff !important;
}

/* With items state - two buttons */
.quote-actions-with-items {
    display: flex;
    gap: 12px;
    width: 100%;
}

.quote-actions button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-quote-btn {
    background: #e1001b !important;
    color: #fff !important;
}

.submit-quote-btn:hover {
    background: #c1001b;
}

.submit-quote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.clear-quote-btn {
   background: #1a1c38 !important;
    color: #fff !important;
    border: solid 2px transparent !important;
}

.clear-quote-btn:hover {
    background: #000214;
    color: #fff;
}

/* Add to Quote Button in Success Popup */
.add-to-quote-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #000214;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.add-to-quote-btn:hover {
    background: #fff;
    color: #000214;
    border-color: #000214;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quote-slideout {
        width: 100%;
        right: -100%;
    }


    .quote-total-row .label{
        font-size: 16px;
    }
    .quote-total-row .value {
        font-size: 20px;
    }
    
    .quote-slideout-content {
        padding: 16px;
    }
    
    .quote-item {
        padding: 16px;
    }
    
    .quote-footer {
        padding: 16px;
    }
    
    .quote-actions {
        flex-direction: column;
    }
    
    .quote-actions button {
        width: 100%;
    }
}

/* Scrollbar Styling */
.quote-slideout-content::-webkit-scrollbar {
    width: 8px;
}

.quote-slideout-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.quote-slideout-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.quote-slideout-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Space Counter Styles */
/* .quote-space-counters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
} */

.space-counter {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.quote-space-counters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: solid 1px #f3f3f3;
}

.space-counter:last-child {
    margin-bottom: 0;
}

.space-counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.space-counter-dates {
    font-size: 14px;
    font-weight: 400;
    color: #000322;
}

.space-counter-text {
    font-size: 13px;
    color: #666;
    display: none;
}

.space-counter-text strong {
    color: #000322;
    font-size: 16px;
}

.space-counter.low .space-counter-text strong {
    color: #ff9800;
}

.space-counter.full .space-counter-text strong {
    color: #e1001b;
}

.space-counter-visual {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.space-box {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.space-box.used {
    background: #e1001b;
    color: white;
    border: 2px solid #e1001b;
}

.space-box.available {
    background: white;
    color: #ccc;
    border: 2px solid #e0e0e0;
}

.space-counter.low .space-box.available {
    border-color: #ff9800;
    color: #ff9800;
}

.space-counter.full .space-box.available {
    border-color: #e1001b;
    color: #e1001b;
}

@media (max-width: 480px) {
    .space-counter-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .space-box {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
}
