/* ================================================
   SIMPLE PRICE LIST - POPUP MODAL
   Matching Portal Colors & Style
   ================================================ */

/* Scoped reset - only inside the price list modal, not global */
#priceListModal *,
#priceListModal *::before,
#priceListModal *::after {
    box-sizing: border-box;
}

/* ================================================
   TRIGGER BUTTON (Bottom Fixed)
   ================================================ */
.price-list-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(163, 142, 72, 0.4);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3c444c, #c9b25f);
    color: #fff;
    z-index: 999;
}

.price-list-trigger:hover {
    background: linear-gradient(135deg, #c9b25f, #3c444c);
    box-shadow: 0 6px 16px rgba(105, 96, 63, 0.4);
    transform: translateY(-2px);
}

/* ================================================
   MODAL OVERLAY
   ================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================
   MODAL CONTAINER
   ================================================ */
.modal-container {
    background: #fffef9;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(105, 96, 63, 0.3);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* clip flex children within the rounded box */
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================================================
   MODAL HEADER
   ================================================ */
.modal-header {
    background: linear-gradient(135deg, #3c444c, #c9b25f);
    color: white;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
	color: #fff;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ================================================
   DISCOUNT BANNER
   ================================================ */
.discount-banner {
    background: linear-gradient(135deg, #f3f0e9, #d1c7a0);
    padding: 12px 25px;
    text-align: center;
    font-size: 14px;
    color: #3c444c;
    font-weight: 600;
    border-bottom: 2px solid #c9b25f;
    flex-shrink: 0;
}

.discount-tag {
    background: linear-gradient(135deg, #3c444c, #c9b25f);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    margin: 0 5px;
}

.discount-separator {
    margin: 0 10px;
    color: #c9b25f;
    font-weight: bold;
}

/* ================================================
   SEARCH BAR
   ================================================ */
.search-container {
    padding: 15px 25px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    min-width: 0;
    padding: 12px 40px 12px 15px;
    border: 2px solid #d1c7a0;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #c9b25f;
    box-shadow: 0 0 0 3px rgba(201, 178, 95, 0.1);
}

.clear-search {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    background: #c9b25f;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:hover {
    background: #3c444c;
}

/* ================================================
   CATEGORY TABS
   ================================================ */
.category-tabs {
    display: flex;
    gap: 5px;
    padding: 15px 25px;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    flex-shrink: 0;
}

.tab-btn {
    padding: 10px 18px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #3c444c;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #f3f0e9;
    border-color: #d1c7a0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3c444c, #c9b25f);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(163, 142, 72, 0.3);
}

/* ================================================
   SERVICES CONTENT
   ================================================ */
.services-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
    min-height: 0; /* critical: lets flex child scroll without overflowing container */
}

/* Custom Scrollbar */
.services-content::-webkit-scrollbar {
    width: 8px;
}

.services-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.services-content::-webkit-scrollbar-thumb {
    background: #c9b25f;
    border-radius: 4px;
}

.services-content::-webkit-scrollbar-thumb:hover {
    background: #3c444c;
}

/* ================================================
   SERVICE GROUPS
   ================================================ */
.service-group {
    margin-bottom: 25px;
}

.service-group.hidden {
    display: none;
}

.service-group-title {
    font-size: 18px;
    font-weight: 700;
    color: #3c444c;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c9b25f;
}

/* ================================================
   SERVICE ITEMS
   ================================================ */
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-item:hover {
    border-color: #c9b25f;
    box-shadow: 0 2px 8px rgba(163, 142, 72, 0.2);
}

.service-item.hidden {
    display: none;
}

.service-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-info strong {
    font-size: 15px;
    color: #3c444c;
}

.service-desc {
    font-size: 12px;
    color: #666;
}

.service-price {
    font-size: 18px;
    font-weight: 700;
    color: #c9b25f;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f3f0e9, #d1c7a0);
    border-radius: 8px;
    white-space: nowrap;
}

/* ================================================
   BOOKKEEPING SUMMARY
   ================================================ */
.bookkeeping-subsection {
    margin-bottom: 20px;
    padding-top: 10px;
}

.bookkeeping-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #3c444c;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f3f0e9, #d1c7a0);
    border-left: 4px solid #c9b25f;
    border-radius: 5px;
}

.bookkeeping-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    font-size: 13px;
    color: #856404;
    border-radius: 5px;
    margin-top: 15px;
}

/* ================================================
   MODAL FOOTER
   ================================================ */
.modal-footer {
    padding: 20px 25px;
    background: white;
    border-top: 2px solid #e0e0e0;
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
}

.modal-footer p {
    margin: 0;
    line-height: 1.6;
}

/* ================================================
   NO RESULTS MESSAGE
   ================================================ */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results h3 {
    color: #3c444c;
    margin-bottom: 10px;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .category-tabs {
        padding: 10px 15px;
        gap: 5px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .services-content {
        padding: 15px;
    }

    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .service-price {
        align-self: flex-end;
    }

    .price-list-trigger {
        bottom: 20px;
        right: 20px;
        padding: 14px 24px;
        font-size: 14px;
    }

    .bookkeeping-summary {
        gap: 10px;
    }

    .modal-footer {
        padding: 15px 20px;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    .modal-overlay {
        position: static;
        background: white;
        display: block !important;
    }

    .modal-container {
        max-width: 100%;
        max-height: none;
        box-shadow: none;
    }

    .modal-header,
    .modal-footer,
    .search-container,
    .category-tabs,
    .close-btn,
    .price-list-trigger {
        display: none !important;
    }

    .service-item {
        break-inside: avoid;
    }
}