/* --- BASE STYLES & VARIABLES (from viq.css) --- */
/* * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 */
 #plansContainer *, .quote-form * {
    font-family: 'Lato';
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Lato';
    color: #333;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

:root {
    --deep-blue: #17B3E4;
    --deep-blue-hover: #17B3E4;
    --magenta: rgb(216 22 113 / 0.9);
    --magenta-hover: rgb(216 22 113 / 0.9);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --yellow-400: #fbbf24;
    --red-500: #ef4444;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
}


/* --- UTILITY CLASSES (from viq.css) --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.desktop-only { display: none; }
.mobile-only { display: block; }


/* --- LAYOUT & HERO SECTION (from viq.css) --- */
.hero-section {
    padding: 2.5rem 0 0;
    background-image:linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),         url(/wp-content/themes/PolicyAdvisor/hndl/uploads/heroImageHndlnew.webp);
    position: relative;
    overflow: visible;
    z-index: 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    max-width: 100%;
}

.hero-content {
    max-width: 80vw;
    margin: 0 auto;
    padding: 0 10px 20px 10px;
    overflow: visible;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.75;
    margin: 0 auto;
}


/* --- QUOTE FORM STYLES (from viq.css) --- */
.quote-form-container {
    width: 100%;
    max-width: 80vw;
    padding-inline: 10px;
    margin: 0 auto;
    overflow: visible;
}

.quote-form {
    background: white;
    border-radius: 0.75rem;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.form-content {
    padding: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
    line-height: 32px;
}

.form-input-wrapper {
    display: flex;
    flex-direction: column;
	justify-content: flex-end;
    flex-grow: 1;
    position: relative;
}

.form-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.50rem;
    text-align: left;
    transition: all 0.2s;
    height: auto;
}

.form-button:hover {
    border-color: var(--deep-blue);
}

.form-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 64, 133, 0.2);
}

.form-button-content {
    display: flex;
    align-items: center;
    min-width: 0;
}

.form-button-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.form-button-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.error-message {
    height: 1rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--red-500);
}

.popover {
    position: absolute;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    z-index: 100000;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
}

.popover.open { display: block; }
.popover-content { padding: 0.75rem; }

.popover-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.popover-item:hover { background-color: var(--gray-100); }
.popover-item.active { background-color: var(--deep-blue); color: white; }

.submit-button {
    width: 100%;
    background-color: var(--magenta);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-button:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--deep-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- HNDL SPECIFIC STYLES (from hndl.css) --- */
.hndl-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.5rem 0.5rem;
}

.hndl-radio-group.inline { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.hndl-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 16px; color: var(--gray-700); }
.hndl-radio input { width: 20px; height: 20px; border: 2px solid var(--gray-300); border-radius: 50%; appearance: none; background: white; cursor: pointer; position: relative; }
.hndl-radio input:checked { border-color: var(--magenta); background: var(--magenta); }
.hndl-radio input:checked::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: white; }

.hndl-product-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 20px !important; }
.hndl-card { display: block; }
.hndl-card input { display: none; }
.hndl-card-body { border: 1px solid var(--gray-300); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; align-items: center; gap: 12px; background: white; }
.hndl-card-title { font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.hndl-card-sub { color: var(--gray-600); font-size: 14px; }
.hndl-card input:checked + .hndl-card-body { border-color: var(--magenta); background: rgba(216, 22, 113, 0.05); box-shadow: 0 0 0 2px rgba(216, 22, 113, .15); }

.hndl-card-radio { width: 20px; height: 20px; border: 2px solid var(--gray-300); border-radius: 50%; background: white; flex-shrink: 0; position: relative; }
.hndl-card input:checked + .hndl-card-body .hndl-card-radio { border-color: var(--magenta); background: var(--magenta); }
.hndl-card input:checked + .hndl-card-body .hndl-card-radio::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: white; }
.hndl-card-content { flex: 1; }

.hndl-coverage-wrapper { position: relative; }
.hndl-coverage-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--gray-100);
    border-radius: 6px;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.50rem;
    text-align: left;
    transition: all 0.2s;
    height: auto;
    color: var(--gray-700);
}
.hndl-coverage-button:hover { border-color: var(--deep-blue); }
.hndl-coverage-button:focus { outline: none; box-shadow: 0 0 0 2px rgba(0, 64, 133, 0.2); }
.hndl-coverage-content { display: flex; align-items: center; min-width: 0; }
.hndl-coverage-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hndl-coverage-chevron { width: 1rem; height: 1rem; opacity: 0.7; flex-shrink: 0; margin-left: 0.5rem; }
.hndl-coverage-dropdown { position: absolute; background: white; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border: 1px solid var(--gray-200); z-index: 100000; display: none; top: 100%; left: 0; right: 0; margin-top: 0.25rem; }
.hndl-coverage-dropdown.open { display: block; }
.hndl-coverage-dropdown-content { padding: 0.75rem; }
.hndl-coverage-item { padding: 0.5rem 0.75rem; border-radius: 0.5rem; cursor: pointer; transition: background-color 0.15s; }
.hndl-coverage-item:hover { background-color: var(--gray-100); }
.hndl-coverage-item.active { background-color: var(--deep-blue); color: white; }



/* --- PLANS & RESULTS SECTION --- */
.plans-section {
    padding: 20px 10px;
    max-width: 80vw;
    margin: 0 auto;
    position: relative;
    z-index: 0;
    overflow: visible;
}

.plans-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.plan-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid var(--deep-blue);
    margin-bottom: 2rem;
    transition: box-shadow 0.2s;
}

.plan-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--deep-blue);
}

.plan-content {
    padding: 1.25rem;
    position: relative;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-blue);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 3rem;
}

.plan-layout {
    display: flex;
    flex-wrap: wrap;
}

.plan-logo-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.plan-logo-wrapper {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 20px 10px;
}

.plan-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.plan-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 8px;
    margin-bottom: 0.25rem;
}

.rating-number {
    font-weight: 700;
    font-size: 1.125rem;
    margin-right: 0.25rem;
}

.rating-stars { display: flex; }
.star { width: 1.25rem; height: 1.25rem; }
.star-empty { color: var(--gray-200); }
.star-filled { color: var(--yellow-400); }

.plan-features {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.feature-icon-wrapper {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    border: 1px solid var(--gray-100);
}

.feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--deep-blue);
}

.feature-content {
    min-width: 0;
    flex: 1;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

.feature-description {
    font-size: 14px;
    color: var(--gray-600);
    word-wrap: break-word;
}

.plan-price-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
	 justify-content: center;
    text-align: center;
}

.plan-price {
	display:none;
    font-size: 3rem;
    font-weight: 700;
    color: var(--magenta);
}

.buy-button {
    width: 100%;
    padding: 0.75rem 2rem;
	margin: 20px 0;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.15s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    background-color: var(--magenta);
    color: white;
}

.buy-button:hover:not(:disabled) {
    background-color: rgba(233, 30, 99, 0.9);
}

.partner_text {
    font-size: 12px;
    line-height: 16px;
    margin-top: 8px;
    color: var(--gray-400);
}

.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.show-more-button {
    color: var(--deep-blue);
    border: 2px solid var(--deep-blue);
    border-radius: 9999px;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 600;
    font-size: 18px;
}

.show-more-button:hover {
    background-color: var(--deep-blue);
    color: white;
}

.empty-state {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.action-button {
    padding: 1rem 2rem;
    background-color: var(--deep-blue);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}


/* --- MODALS (from viq.css) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.open { display: flex; }


/* --- PROVINCIAL HEALTH PLAN POPUP --- */
.provincial-health-modal {
    background: white;
    border-radius: 6px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.provincial-modal-header {
    background-color: var(--magenta);
    color: white;
    padding: 1.5rem;
    border-radius: 6px 6px 0 0;
    position: relative;
}

.provincial-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
	color:#fff;
    margin: 0;
    padding-right: 3rem;
    line-height: 1.4;
}

.provincial-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.provincial-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.provincial-modal-close svg {
    width: 1rem;
    height: 1rem;
    color: white;
}

.provincial-modal-content {
    padding: 1.5rem;
}

.provincial-modal-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0 0 1.5rem 0;
}

.provincial-modal-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.provincial-modal-button {
    background-color: var(--magenta);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.provincial-modal-button:hover {
    background-color: rgba(216, 22, 113, 0.9);
    transform: translateY(-1px);
}

/* --- SHOW MORE COVERAGE DETAILS --- */
.show-more-features {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.show-more-features:hover {
    background-color: #f1f5f9;
    border-color: var(--deep-blue);
}

.feature-icon-wrapper {
    display: flex;
	margin:0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: white;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
}

.show-more-features .feature-content {
    flex: 1;
}

.show-more-features .feature-title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.25px;
    margin: 0;
}

/* Disabled coverage type item */
.hndl-coverage-item.disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.hndl-coverage-item.disabled:hover {
    background-color: transparent !important;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 28rem;
    width: 100%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.customer-form { padding: 1.5rem; }
.form-header { margin-bottom: 1.5rem; }
.form-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; }
.form-subtitle { color: var(--gray-600); font-size: 0.875rem; }
.form-group { margin-bottom: 1rem; }
.form-input-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 0.25rem; }
.form-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 0.375rem; font-size: 0.875rem; }
.form-buttons { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.form-submit, .form-cancel { flex: 1; padding: 0.625rem 1rem; border-radius: 0.375rem; font-weight: 500; cursor: pointer; border: none; font-size: 0.875rem; }
.form-submit { background-color: var(--deep-blue); color: white; }
.form-cancel { background: white; border: 1px solid var(--gray-300); color: var(--gray-700); }

.mobile-details-popup { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 9998; }
.mobile-details-popup.open { display: flex; }
.mobile-details-content { background: white; border-radius: 0.75rem; width: 100%; max-width: 24rem; max-height: 85vh; overflow-y: auto; position: relative; }
.mobile-details-inner { padding: 1.5rem; }
.mobile-details-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-100); }
.close-button { padding: 0.5rem; background: transparent; border: none; border-radius: 9999px; cursor: pointer; }


/* --- RESPONSIVE STYLES --- */
@media (max-width: 767px) {
    .plans-section, .hero-content, .quote-form-container {
        max-width: 100vw !important;
		padding: 0 20px 20px 20px;
    }
	.quote-form-container{
		padding:0;
	}
	.hndl-product-types{
		grid-template-columns: repeat(1, 1fr);
	}
	.plan-name{
		margin-top: 0;
	}
}

@media (min-width: 0px) {
    .hndl-grid .col-span-6 { grid-column: span 12; }
    .hndl-grid .col-span-12 { grid-column: span 12; }
	.hndl-grid .col-span-12 { grid-column: span 12; }
	.hndl-grid .col-span-12 { grid-column: span 12; }
	.hndl-grid .col-span-12 { grid-column: span 12; }
}

@media (min-width: 991px) {
    .mobile-only { display: none; }
    .desktop-only { display: flex; }
    .mt-desktop-0 { margin-top: 0; }
    
    .hero-title { font-size: 2.5rem; }
    .form-content { padding: 1.5rem; }
    .form-grid { grid-template-columns: repeat(12, 1fr); gap: 0.5rem 0.5rem; }
	.empty-div{display:block}
	.col-span-5 { grid-column: span 5; }	
    .col-span-12 { grid-column: span 12; }	
	/* Force 1/3 layout for province, coverage and CTA */
	.province_field{ grid-column: span 4 !important; }
	.coverage_type_field{ grid-column: span 4 !important; }
	.get-quote-button .form-input-wrapper{ width: 100%; display: flex; justify-content: flex-end; }
	.get-quote-button .submit-button{ width: auto; }
	.get-quote-button{
		grid-column: span 3 !important;
	}

    .hndl-grid .col-span-6 { grid-column: span 6; }
    
	
    .plans-title { font-size: 1.875rem; }
    .plan-name { text-align: left; margin-top: 0; }
    .plan-layout { flex-wrap: nowrap; }
	 .plan-logo-section {
        width: 12rem;
        display: flex;
        margin-bottom: 0;
        padding-right: 1.5rem;
        justify-content: center;
    }
    .plan-features { 
        flex: 1; 
        display: grid;
        grid-template-columns: repeat(3, 1fr); 
        gap: 1rem; 
        padding-right: 0.75rem; 
        border-right: 1px solid #ddd;
    }

    .plan-price-section { width: 14rem; padding-left: 0.75rem; margin-bottom:30px !important }
    .plan-price { font-size: 36px; font-weight: 800; }
}

@media (min-width: 1240px) {
    .plan-features { 
        flex: 1; 
        display: grid;
        grid-template-columns: repeat(4, 1fr); 
        gap: 1rem; 
        padding-right: 0.75rem; 
        border-right: 1px solid #ddd;
    }
    /* Center the last row when it has 2 items (9th and 10th items) */
    .plan-features .feature-item:nth-child(9) {
        grid-column: 2;
    }
    .plan-features .feature-item:nth-child(10) {
        grid-column: 3;
    }
}
@media (min-width: 991px) and (max-width: 1350px) {
        .hero-content, .quote-form-container {
        max-width: 90vw;
        padding: 0 0 20px 0;
    }
    .plans-section { max-width: 90vw !important; }
}