.custom-search-input {
    height: 42px !important;
    line-height: 38px !important;
    /* 42px - 2*2px border = 38px content box approx */
    background: #ffffff !important;
    border: 2px solid #eef2f7 !important;
    border-radius: 12px !important;
    padding: 0 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    /* Match Select font-weight */
    color: #0f2240 !important;
    transition: all 0.2s;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.custom-search-input:focus {
    border-color: #e94f43 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 164, 0.15) !important;
    outline: none !important;
}

.domain-pricing-table-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 34, 64, 0.08);
    overflow: hidden;
    border: 1px solid rgba(15, 63, 140, 0.08);
    margin-top: 20px;
    padding: 0 !important;
    position: relative;
    /* For pseudo-element */
}

/* Create a teal background block behind the header to cover any gaps */
.domain-pricing-table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    /* Covers header height and potential top gaps */
    background: #e94f43;
    z-index: 0;
}

/* Ensure table content sits above the background */
.domain-pricing-table-container table {
    position: relative;
    z-index: 1;
}

.domain-pricing-table {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

/* Hide the top control row of DataTables (length/filter) which causes white space */
.domain-pricing-table-container .dataTables_wrapper>.row:first-child {
    display: none !important;
    margin: 0 !important;
    height: 0 !important;
}

.domain-pricing-table-container .dataTables_wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.domain-pricing-table-container .dataTables_info,
.domain-pricing-table-container .dataTables_filter {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove padding from the Bootstrap grid columns inside DataTables wrapper */
.domain-pricing-table-container .dataTables_wrapper .col-sm-12 {
    padding: 0 !important;
    margin: 0 !important;
}

/* Force override with high specificity */
div.domain-pricing-table-container table.domain-pricing-table thead th,
table.dataTable.domain-pricing-table thead th {
    background-color: #e94f43 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 15px 20px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    border-bottom: none !important;
    /* Remove DataTables bottom border */
    border-radius: 0 !important;
    /* Prevent individual cell rounding causing gaps */
    text-align: left !important;
    vertical-align: middle !important;
}



/* Ensure thead has background too just in case */
div.domain-pricing-table-container table.domain-pricing-table thead {
    background-color: #e94f43 !important;
    border: none !important;
}

table.domain-pricing-table {
    border-top: none !important;
    border: none !important;
    table-layout: fixed !important;
}

.domain-pricing-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-top: 1px solid #eef2f7;
    color: #0f2240;
    font-weight: 500;
    font-size: 0.95rem;
    background-color: #ffffff;
    text-align: left !important;
}

.domain-pricing-table td:first-child {
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f3f8c;
    /* display: flex; align-items: center; removed to fix vertical alignment */
    padding-left: 30px !important;
    /* Slightly indented to align with header visual */
}

/* Indent Price columns */
.domain-pricing-table td:nth-child(3),
.domain-pricing-table td:nth-child(4),
.domain-pricing-table td:nth-child(5) {
    padding-left: 25px !important;
}

/* Indent Grace Period column */
.domain-pricing-table td:nth-child(6) {
    padding-left: 45px !important;
}

/* Indent Redemption Period column */
/* Indent Redemption Period column - Changed to Action column */
.domain-pricing-table td:nth-child(7) {
    padding-left: 20px !important;
    text-align: center !important;
}

.domain-pricing-table tr:nth-child(even) td {
    background-color: #fafafa;
}

.domain-pricing-table tr:hover td {
    background-color: #f8fafc;
}

.domain-pricing-table .tld-sale-group {
    display: inline-block;
    vertical-align: middle;
    background-color: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 8px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.25);
    text-transform: uppercase;
}

.price-entry {
    font-weight: 700;
    color: #0f3f8c;
    font-size: 1rem;
}

.price-entry small {
    font-weight: 500;
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 4px;
}

/* Hide legacy system filters so only the custom controls show */
.domain-pricing .tld-filters select,
.domain-pricing .dataTables_filter,
.domain-pricing .dataTables_info,
.domain-pricing .dataTables_length {
    display: none !important;
}

.domain-pricing-table-container .bottom {
    background: #ffffff;
    padding: 10px 15px;
}

/* Custom Dropdown Styling */
/* Aggressively hide EVERYTHING in the filter column that isn't our custom wrapper */
/* Aggressively hide EVERYTHING in the filter columns (col-md-3) that isn't our custom wrapper */
/* Relaxed hiding to ensure visibility if JS fails */
.tld-filters>.col-md-3>select.hidden-by-js {
    display: none !important;
}

#domainPricingInfo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    position: relative !important;
    z-index: 100 !important;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    display: block !important;
    /* Ensure our wrapper is visible */
    z-index: 10;
    /* Ensure it stays on top */
}

.tld-custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #0f2240;
    height: 42px;
    line-height: 42px;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid #eef2f7;
    border-radius: 12px;
    transition: all 0.2s;
}

.custom-select__trigger:after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f3f8c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.2s;
}

.tld-custom-select.open .custom-select__trigger {
    border-color: #e94f43;
    box-shadow: 0 0 0 4px rgba(16, 185, 164, 0.15);
}

.tld-custom-select.open .custom-select__trigger:after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 2px solid #eef2f7;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: #fff;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

/* Custom Scrollbar for Options */
.custom-options::-webkit-scrollbar {
    width: 6px;
}

.custom-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.custom-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}

.custom-options::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.tld-custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    border-color: #e94f43;
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #0f2240;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f4f6f9;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background-color: #f0fdfb;
    color: #e94f43;
    padding-left: 24px;
}

.custom-option.selected {
    color: #e94f43;
    font-weight: 700;
    background-color: #f0fdfb;
}

.hosting-section-title {
    color: rgb(34, 75, 139);
    font-family: "Open Sans", sans-serif;
    font-size: 40px;
    font-weight: 700;
    height: 48px;
    line-height: 48px;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
    position: relative;
    display: block;
    /* changed from inline-block to allow centering */
    z-index: 5;
}

.hosting-section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 5px;
    background: #e94f43;
    border-radius: 3px;
    margin: 10px auto 0;
}

.tld-filters-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f2240;
    margin-bottom: 15px;
    text-align: left;
    padding-left: 0;
}

.tld-filters .col-md-3:first-child {
    padding-left: 0;

}

/* Responsive adjustments */
@media (max-width: 768px) {

    .domain-pricing-table th,
    .domain-pricing-table td {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .domain-pricing-table td:first-child {
        font-size: 1rem;
    }

    /* Fix Title Overlapping */
    .hosting-section-title {
        height: auto !important;
        line-height: 1.2 !important;
        font-size: 30px !important;
        margin-bottom: 25px !important;
        padding-bottom: 10px;
    }

    .tld-filters-title {
        margin-top: 15px;
    }

    /* Allow horizontal scroll for table */
    .domain-pricing-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Force table to maintain width so it scrolls instead of squashing */
    .domain-pricing-table {
        min-width: 850px !important;
    }
}

/* Add bottom border to the last row of the table */
table.domain-pricing-table {
    border-bottom: 1px solid #eef2f7 !important;
}

/* Pagination Styling */
.domain-pricing-table-container .dataTables_paginate {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* 
   Reset and Layout
   We use margins for spacing to be safe against different HTML structures (e.g. spans vs lists).
*/
.domain-pricing-table-container .dataTables_paginate .paginate_button {
    margin: 0 5px !important;
    /* Explicit spacing between buttons */
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-flex !important;
}

/* 
   Target the actual clickable element
*/
.domain-pricing-table-container .dataTables_paginate .paginate_button>a,
.domain-pricing-table-container .dataTables_paginate .paginate_button>span,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px !important;
    border-radius: 8px !important;
    border: 1px solid #e94f43 !important;
    background-color: #ffffff !important;
    color: #e94f43 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Hover State */
.domain-pricing-table-container .dataTables_paginate .paginate_button>a:hover,
.domain-pricing-table-container .dataTables_paginate .paginate_button>span:hover,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button:hover {
    background-color: #e94f43 !important;
    color: #ffffff !important;
    border-color: #e94f43 !important;
}

/* Active State */
.domain-pricing-table-container .dataTables_paginate .paginate_button.active>a,
.domain-pricing-table-container .dataTables_paginate .paginate_button.active>span,
.domain-pricing-table-container .dataTables_paginate .paginate_button.current>a,
.domain-pricing-table-container .dataTables_paginate .paginate_button.current>span,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button.current {
    background-color: #e94f43 !important;
    color: #ffffff !important;
    border-color: #e94f43 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 164, 0.2) !important;
}

/* Disabled State */
.domain-pricing-table-container .dataTables_paginate .paginate_button.disabled>a,
.domain-pricing-table-container .dataTables_paginate .paginate_button.disabled>span,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button.disabled,
.domain-pricing-table-container .dataTables_paginate .paginate_button.disabled:hover>a,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button.disabled:hover {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}

/* Specific styles for Prev/Next text buttons */
.domain-pricing-table-container .dataTables_paginate .paginate_button.previous>a,
.domain-pricing-table-container .dataTables_paginate .paginate_button.next>a,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button.previous,
.domain-pricing-table-container .dataTables_paginate>a.paginate_button.next {
    width: auto !important;
    padding: 0 15px !important;
}

/* Domain Buy Modal Whois Button */
.btn-whois-modal {
    background-color: #e94f43 !important;
    border-color: #e94f43 !important;
    color: #ffffff !important;
}

.btn-whois-modal:hover,
.btn-whois-modal:focus,
.btn-whois-modal:active {
    background-color: #0d9685 !important;
    border-color: #0d9685 !important;
    color: #ffffff !important;
}

/* Domain Buy Modal Whois Content Headers */
#modalWhoisResult .card-title,
#modalWhoisResult .card-title i {
    color: #e94f43 !important;
}

/* Responsive adjustments for Filters to stack nicely on smaller screens */
@media (max-width: 770px) {
    .tld-filters .col-md-3 {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        margin-bottom: 15px;
        padding-left: 15px !important;
        /* Restore standard padding for alignment */
        padding-right: 15px !important;
    }

    /* Override the specific first-child rule to ensure alignment */
    .tld-filters .col-md-3:first-child {
        padding-left: 15px !important;
    }

    /* Last child (Text info) centering or alignment */
    .tld-filters .col-md-3:last-child {
        text-align: left !important;
        /* Align text left like inputs */
        margin-bottom: 0;
    }

    /* Stacking order for filters so dropdowns appear ABOVE subsequent elements */
    .tld-filters .col-md-3:nth-child(1) {
        position: relative;
        z-index: 40;
    }

    .tld-filters .col-md-3:nth-child(2) {
        position: relative;
        z-index: 30;
    }

    .tld-filters .col-md-3:nth-child(3) {
        position: relative;
        z-index: 20;
    }

    .tld-filters .col-md-3:nth-child(4) {
        position: relative;
        z-index: 10;
    }
}