/* Main Container */
.pakistandiary-plan-finder {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.page-title {
    text-align: center;
    margin-bottom: 30px;
}
.page-title h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}
.page-title p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Tabs Navigation */
.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}
.nav-tabs li {
    margin: 0 10px;
    list-style: none;
}
.nav-tabs li a {
    padding: 10px 15px;
    color: #7f8c8d;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s;
}
.nav-tabs li.active a {
    color: #e74c3c;
    background-color: #f9f9f9;
    border-bottom: 2px solid #e74c3c;
}

/* Form Styles */
.planfinder-form {
    margin-top: 20px;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    flex: 1;
    min-width: 250px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

/* Custom Multiselect Dropdown */
.custom-multiselect {
    position: relative;
    width: 100%;
}
.select-box {
    position: relative;
}
.select-box select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.over-select {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    cursor: pointer;
}
.dropdown-options {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dropdown-options.show {
    display: block;
}
.option-item {
    padding: 8px 15px;
    display: flex;
    align-items: center;
}
.option-item:hover {
    background-color: #f5f5f5;
}
.option-item input {
    margin-right: 10px;
}
.loading-options {
    padding: 10px;
    color: #7f8c8d;
    font-style: italic;
}

/* Net Options */
.net-options {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}
.net-option {
    display: flex;
    align-items: center;
    gap: 10px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #e74c3c;
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* Price Range */
.price-range-container {
    width: 100%;
}
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}
.price-inputs .separator {
    color: #7f8c8d;
}
.price-slider {
    position: relative;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    margin: 20px 0;
}
.price-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: none;
    pointer-events: none;
}
.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #e74c3c;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    margin-top: -6px;
}
.price-slider .range-min {
    z-index: 2;
}
.price-slider .range-max {
    z-index: 1;
}

/* Submit Button */
.find-plan-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 300px;
    justify-content: center;
}
.find-plan-btn:hover {
    background-color: #c0392b;
}

/* Results Section */
.planfinder-results {
    margin-top: 40px;
}
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sort-options select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.results-count {
    color: #7f8c8d;
    font-size: 14px;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
}
.results-table th, .results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.results-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #2c3e50;
}
.results-table tr:hover {
    background-color: #f9f9f9;
}

/* Plan Details Page */
.pdf-plan-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pdf-plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.pdf-plan-header h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.last-updated {
    color: #7f8c8d;
    font-size: 14px;
}

.pdf-plan-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.highlight-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.highlight-box h2 {
    color: #e74c3c;
    font-size: 28px;
    margin: 0 0 10px;
}

.highlight-box p {
    color: #7f8c8d;
    margin: 0;
    font-size: 16px;
}

.pdf-plan-description {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-plan-description h3 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
    display: inline-block;
}

.pdf-related-plans {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-related-plans h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
}

.related-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-plan {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.related-plan h4 {
    color: #2c3e50;
    margin-top: 0;
}

.related-plan .price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.view-plan-btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.view-plan-btn:hover {
    background: #c0392b;
}

/* Clickable rows in results */
.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: #f5f5f5 !important;
}

.pdf-error {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
    }
    .nav-tabs li {
        margin: 5px;
    }
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    .net-options {
        justify-content: flex-start;
    }
    .results-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .results-table {
        display: block;
        overflow-x: auto;
    }
}