/* Main Calculator Styles */
#wedding-cost-calculator {
    display: flex;
    flex-direction: column;
    min-height: 25vh;
    justify-content: flex-start;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Header Section */
#bu-in {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#bu-in h2 {
    color: #530CDF;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#bu-in p {
    color: #008800;
    text-align: center;
}

#bu-in h5 {
    color: #fa0202;
    cursor: pointer;
    margin: 5px 0;
}

/* Package Selection */
#package-selection {
    margin: 20px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#package-selection label {
    font-size: 18px;
    margin-bottom: 10px;
}

#package-selection > div {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#package-selection label {
    margin-right: 15px;
}

/* Dish Selection */
#dish-selection {
    margin: 20px 0;
    text-align: center;
}

#dish-selection label {
    font-size: 18px;
    margin-right: 20px;
}

#dish-selection input[type="radio"] {
    margin-right: 5px;
}

/* Guest Count Input */
#total-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

#total-input label {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

#guest_count {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #530CDF;
    border-radius: 8px;
    width: 200px;
    text-align: center;
}

/* Desktop Floating Total */
#desktop-floating-total {
    width: auto;
    height: auto;
    padding: 10px 15px;
    background: linear-gradient(135deg, #530CDF, #3d0a9b);
    color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin: 20px auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: block;
    position: relative;
}

#desktop-floating-total[style*="fixed"] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#desktop-floating-total h5 {
    margin: 5px 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: #ffffff;
}

#desktop-floating-total span {
    font-weight: 700;
}

/* Table Responsive Container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Menu Table */
#menu-table-m {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

#menu-table-m thead th {
    background: #530CDF;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 6px;
    border-bottom: 2px solid #3d0a9b;
    text-align: center;
}

#menu-table-m th,
#menu-table-m td {
    padding: 4px 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
    color: #333;
}

#menu-table-m tbody tr:nth-child(even) {
    background: #fafafa;
}

#menu-table-m tbody tr:hover {
    background: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Other Needs Table */
#other-needs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

#other-needs-table thead th {
    background: #530CDF;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 6px;
    border-bottom: 2px solid #3d0a9b;
    text-align: center;
}

#other-needs-table th,
#other-needs-table td {
    padding: 4px 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
    color: #333;
}

#other-needs-table tbody tr:nth-child(even) {
    background: #fafafa;
}

#other-needs-table tbody tr:hover {
    background: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Other Costs Table */
#other_costs_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

#other_costs_table thead th {
    background: #530CDF;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 6px;
    border-bottom: 2px solid #3d0a9b;
    text-align: center;
}

#other_costs_table th,
#other_costs_table td {
    padding: 4px 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
    color: #333;
}

#other_costs_table tbody tr:nth-child(even) {
    background: #fafafa;
}

#other_costs_table tbody tr:hover {
    background: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Category Row Styles */
.category-row td {
    background: #f8f8f8 !important;
    font-weight: bold !important;
    padding: 8px !important;
    border-bottom: 2px solid #ddd !important;
}

/* Inner div for flex layout */
.category-row td div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Category name */
.category-row td div span {
    font-size: 14px;
    color: #333;
}

.category-row td::before {
    content: attr(data-category);
    flex-grow: 1;
}

.category-remove-btn {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    padding: 2px 8px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    min-width: 24px !important;
    text-align: center !important;
    transition: background-color 0.2s ease !important;
}

.category-remove-btn:hover {
    background: #c82333 !important;
}

/* Input Styles */
#wedding-cost-calculator input[type="number"] {
    width: 70px;
    padding: 3px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin: 0 auto;
    display: block;
    background: #fff;
    transition: border-color 0.3s ease;
}

#wedding-cost-calculator input[type="number"]:focus {
    border-color: #530CDF;
    outline: none;
    box-shadow: 0 0 3px rgba(83, 12, 223, 0.3);
}

/* Button Styles */
#wedding-cost-calculator button {
    padding: 3px 8px;
    font-size: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: background-color 0.2s ease;
}

#wedding-cost-calculator button:hover {
    background: #c82333;
}

#add_product_btn,
#add_other_needs_btn,
#add_cost_btn {
    background-color: #28a745 !important;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 13px;
}

#add_product_btn:hover,
#add_other_needs_btn:hover,
#add_cost_btn:hover {
    background-color: #218838 !important;
}

#submit_order {
    background-color: #530CDF;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submit_order:hover {
    background-color: #3d0a9b;
}

/* Desktop Total Container */
#total-buy-now-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    background: linear-gradient(135deg, #530CDF, #3d0a9b);
    color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

#total-buy-now-container h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    color: #ffffff;
}

#total-buy-now-container span {
    font-weight: 700;
}

/* Error Tooltip */
.error-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    display: none;
}

.error-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #dc3545 transparent transparent transparent;
}

/* Order Form Styles */
#order_form label {
    display: block;
    margin: 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

#order_form input,
#order_form textarea {
    width: 100%;
    padding: 6px;
    margin-bottom: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

#order_form input:focus,
#order_form textarea:focus {
    border-color: #530CDF;
    outline: none;
    box-shadow: 0 0 4px rgba(83, 12, 223, 0.3);
}

.required {
    color: #dc3545;
    font-weight: bold;
}

#order_message {
    color: green;
    display: none;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid green;
    background-color: #e0ffe0;
    text-align: center;
}

/* Terms and Conditions */
.terms-and-conditions {
    font-size: 13px;
    color: #444;
    margin: 20px 0;
    width: 100%;
}

.terms-and-conditions > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.terms-and-conditions input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0 8px 0 0;
    width: 18px;
    height: 18px;
}

.terms-and-conditions a {
    color: #007BFF;
    text-decoration: none;
    border: 1px solid #007BFF;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}

#terms_content {
    max-height: 20vh;
    box-sizing: border-box;
    background: #f9f9f9;
    transition: all 0.3s ease;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    overflow-y: auto;
    max-width: 100%;
    overflow-x: auto;
}

#terms_content div {
    min-width: 300px;
    padding: 8px;
}

#terms_error {
    color: #dc3545;
    display: none;
    font-size: 13px;
    margin-top: 8px;
    width: 100%;
}

/* Popup Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

.popup-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.popup-header {
    background: linear-gradient(135deg, #530CDF, #3d0a9b);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: relative;
}

.popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    flex-grow: 1;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* Popup Content */
.popup-content {
    display: flex;
    flex-direction: column;
    max-height: 50vh;
    overflow: hidden;
    background: #f9f9f9;
    width: 100%;
    box-sizing: border-box;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Search Section */
.popup-search-section {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.search-filters {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.category-filter {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 160px;
}

.category-select,
.popup-search-input,
.clear-filter-btn {
    height: 42px !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 !important;
}

.category-select {
    width: 100%;
    padding: 0 10px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 200px;
}

.popup-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    min-width: 150px;
    line-height: 24px;
}

.clear-filter-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.clear-filter-btn:hover {
    background: #218838;
}

/* Popup Items Container */
#product_popup_items,
#cost_popup_items,
#other_needs_popup_items {
    flex: 1;
    overflow-y: auto;
    padding: 0 !important;
    max-height: calc(50vh - 100px);
    width: 100%;
    box-sizing: border-box;
}

/* Desktop left and right padding */
@media (min-width: 1025px) {
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Tablet left and right padding */
@media (min-width: 769px) and (max-width: 1024px) {
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Mobile left and right padding */
@media (max-width: 768px) {
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-height: calc(90vh - 180px);
    }
}

/* Small mobile left and right padding */
@media (max-width: 480px) {
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Popup Items */
.popup-content label {
    display: flex;
    align-items: center;
    margin: 8px 0;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333333 !important;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    word-break: break-word;
    line-height: 1.4;
}

.popup-content label:hover {
    background: #f0f7ff;
    border-color: #530CDF;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(83,12,223,0.1);
}

.popup-content label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0 12px 0 0;
    cursor: pointer;
}

.popup-content input[type="checkbox"]:checked + label {
    background: #e8f0fe;
    border-color: #530CDF;
    font-weight: 600;
}

/* Popup Categories */
.popup-content .category {
    margin-bottom: 20px;
    margin-top: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.popup-content .category:first-child {
    margin-top: 0;
}

.popup-content .category h4 {
    background: #530CDF;
    color: white !important;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    display: block;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(83,12,223,0.2);
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Popup Footer */
.popup-footer {
    padding: 15px 20px;
    background: #f1f3f5;
    text-align: right;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
}

.add-btn {
    background-color: #28a745 !important;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.add-btn:hover {
    background-color: #218838 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.cancel-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Responsive Styles - EXACTLY as in original */
@media (max-width: 768px) {
    #desktop-floating-total {
        display: block !important;
        position: static !important;
        margin: 20px auto;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 10px 15px;
        background: linear-gradient(135deg, #530CDF, #3d0a9b);
        color: #ffffff;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    #desktop-floating-total[style*="fixed"] {
        position: fixed !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 10px 15px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    #desktop-floating-total[style*="fixed"] h5 {
        font-size: 14px;
        margin: 5px 0;
        text-align: center;
        white-space: nowrap;
    }
    
    #total-buy-now-container {
        display: flex !important;
        margin: 10px 0;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    #wedding-cost-calculator {
        padding-top: 0;
    }
    
    #menu-table-m th,
    #menu-table-m td,
    #other-needs-table th,
    #other-needs-table td {
        font-size: 12px;
        padding: 5px;
    }
    
    #wedding-cost-calculator .category-row td {
        flex-wrap: wrap;
    }
    
    #wedding-cost-calculator .category-remove-btn {
        margin-left: 15px;
        font-size: 10px !important;
        padding: 1px 4px !important;
    }
    
    /* Mobile Popup Styles */
    .search-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .category-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .popup-search-input {
        width: 100%;
        min-width: unset;
    }
    
    .clear-filter-btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 10px;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-btn, .cancel-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .popup-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .popup-header h3 {
        font-size: 16px;
    }
    
    .popup-content {
        padding: 0 !important;
        max-width: 100% !important;
    }
    
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-height: calc(90vh - 180px);
    }
    
    /* MOBILE CATEGORY STYLING - COMPLETELY ELIMINATED ALL GAPS */
    .popup-content .category {
        margin: 0 !important;
        padding: 0 !important;
        width: 100%;
        max-width: 100%;
    }
    
    .popup-content .category h4 {
        font-size: 15px;
        padding: 12px 15px;
        margin: 0 !important;
        border-radius: 6px 6px 0 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .popup-content .category:first-child h4 {
        border-radius: 6px 6px 0 0;
    }
    
    .popup-content label {
        font-size: 14px;
        padding: 12px 15px;
        margin: 0 !important;
        border-radius: 0;
        border-top: none;
        width: 100%;
        box-sizing: border-box;
    }
    
    .popup-content label:first-of-type {
        border-top: 1px solid #e0e0e0;
    }
    
    .popup-content label:last-of-type {
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0 !important;
    }
    
    .category-remove-btn {
        font-size: 10px !important;
        padding: 1px 4px !important;
        right: 5px !important;
    }
    
    /* Ensure last category has no bottom margin */
    .popup-content .category:last-child {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    #desktop-floating-total[style*="fixed"] {
        top: 8px !important;
        padding: 8px 12px !important;
    }
    
    #desktop-floating-total[style*="fixed"] h5 {
        font-size: 13px;
        margin: 3px 0;
    }
    
    #total-buy-now-container {
        padding: 12px;
    }
    
    #total-buy-now-container h3 {
        font-size: 15px;
    }
    
    #wedding-cost-calculator {
        padding-top: 0;
    }
    
    #product_popup_items,
    #cost_popup_items,
    #other_needs_popup_items {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .popup-content .category h4 {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .popup-content label {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (min-width: 769px) {
    #desktop-floating-total {
        display: block;
    }
    
    #total-buy-now-container {
        display: flex;
    }
    
    .popup-modal {
        max-width: 700px;
    }
    
    .search-filters {
        flex-wrap: nowrap;
    }
}

/* Additional Styles from Original */
#success_message {
    padding: 10px;
    margin-top: 10px;
    border: 1px solid green;
    background-color: #e0ffe0;
    text-align: center;
}

#categories,
#other_cost_categories,
#other_needs_categories {
    font-family: 'Arial', sans-serif;
    padding: 20px;
    border: 2px solid #530CDF;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#categories h5,
#other_cost_categories h5,
#other_needs_categories h5 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#categories .category input[type="checkbox"],
#other_cost_categories .category input[type="checkbox"],
#other_needs_categories .category input[type="checkbox"] {
    margin-right: 5px;
}

#categories .category input[type="checkbox"]:checked + label,
#other_cost_categories .category input[type="checkbox"]:checked + label,
#other_needs_categories .category input[type="checkbox"]:checked + label {
    font-weight: bold;
    background-color: #e0f7fa;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 14px;
}

#instructions_popup_content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

#instructions_popup_content #instructions {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
}

#instructions_popup_content #instructions h5 {
    margin: 0 0 15px 0;
    padding: 15px 20px 0 20px;
    font-size: 16px;
    color: #333;
    text-align: center;
}

#instructions_popup_content #instructions p {
    margin: 0;
    padding: 0 20px 15px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

#instructions_popup_content #instructions p span {
    display: block;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

#instructions_popup_content #instructions h6 {
    margin: 0;
    padding: 0 20px 20px 20px;
    font-size: 13px;
    color: #d32f2f;
    font-style: italic;
    text-align: center;
}

#instructions_popup_content iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: none;
    margin: 0;
    padding: 0;
}

/* Desktop styles */
@media (min-width: 1025px) {
    #instructions_popup_content #instructions h5 {
        padding: 20px 25px 0 25px;
        font-size: 18px;
    }
    
    #instructions_popup_content #instructions p {
        padding: 0 25px 20px 25px;
        font-size: 15px;
    }
    
    #instructions_popup_content #instructions h6 {
        padding: 0 25px 25px 25px;
        font-size: 14px;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    #instructions_popup_content #instructions h5 {
        padding: 18px 20px 0 20px;
    }
    
    #instructions_popup_content #instructions p {
        padding: 0 20px 18px 20px;
    }
    
    #instructions_popup_content #instructions h6 {
        padding: 0 20px 20px 20px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    #instructions_popup {
        width: 95%;
        max-height: 90vh;
    }
    
    #instructions_popup_content #instructions h5 {
        padding: 15px 15px 0 15px;
        font-size: 16px;
    }
    
    #instructions_popup_content #instructions p {
        padding: 0 15px 12px 15px;
        font-size: 13px;
        line-height: 1.5;
    }
    
    #instructions_popup_content #instructions p span {
        padding: 12px;
    }
    
    #instructions_popup_content #instructions h6 {
        padding: 0 15px 15px 15px;
        font-size: 12px;
    }
    
    #instructions_popup_content iframe {
        height: 250px;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    #instructions_popup_content #instructions h5 {
        padding: 12px 12px 0 12px;
        font-size: 15px;
    }
    
    #instructions_popup_content #instructions p {
        padding: 0 12px 10px 12px;
        font-size: 12px;
    }
    
    #instructions_popup_content #instructions p span {
        padding: 10px;
    }
    
    #instructions_popup_content #instructions h6 {
        padding: 0 12px 12px 12px;
        font-size: 11px;
    }
    
    #instructions_popup_content iframe {
        height: 200px;
    }
}

/* Ensure popup header has proper padding */
#instructions_popup .popup-header {
    padding: 15px 20px;
}

#instructions_popup .popup-header h3 {
    margin: 0;
    font-size: 18px;
}

#instructions_popup .popup-footer {
    padding: 15px 20px;
}

/* Mobile header/footer adjustments */
@media (max-width: 768px) {
    #instructions_popup .popup-header {
        padding: 12px 15px;
    }
    
    #instructions_popup .popup-header h3 {
        font-size: 16px;
    }
    
    #instructions_popup .popup-footer {
        padding: 12px 15px;
    }
    
    #instructions_popup .cancel-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #instructions_popup .popup-header {
        padding: 10px 12px;
    }
    
    #instructions_popup .popup-header h3 {
        font-size: 15px;
    }
    
    #instructions_popup .popup-footer {
        padding: 10px 12px;
    }
}

/* Order History Table */
#order-history {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#order-history h3 {
    color: #530CDF;
    margin-bottom: 15px;
    text-align: center;
}

.order-history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-history-table thead th {
    background: #530CDF;
    color: white;
    padding: 12px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.order-history-table tbody tr {
    border-bottom: 1px solid #eee;
}

.order-history-table tbody tr:hover {
    background: #f5f5f5;
}

.order-history-table td {
    padding: 10px;
    text-align: center;
    font-size: 13px;
}

.show-order-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.show-order-btn:hover {
    background: #218838;
}

/* Responsive table */
@media (max-width: 768px) {
    .order-history-table {
        font-size: 12px;
    }
    
    .order-history-table th,
    .order-history-table td {
        padding: 8px 5px;
    }
    
    .show-order-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .order-history-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}