/**
 * Single Product Page Styles
 * Extracted inline styles into CSS classes.
 * NOTE: Existing classes/IDs are NOT modified here — only NEW classes added.
 */

/* ─── Debug Boxes ─── */
.csp-debug-box-error {
    background: #ffebee;
    padding: 10px;
    margin: 10px;
    border: 2px solid red;
}

.csp-debug-box-success {
    background: #e8f5e9;
    padding: 10px;
    margin: 10px;
    border: 2px solid green;
}

/* ─── THL Extras Block ─── */
.csp-extras-block {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.csp-extras-block-title {
    margin-top: 0;
    color: #333;
}

/* ─── Insurance Section ─── */
.csp-insurance-section {
    margin-bottom: 20px;
}

.csp-insurance-heading {
    color: #28a745;
    border-bottom: 2px solid #28a745;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.csp-insurance-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Insurance Card ─── */
.csp-insurance-card {
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    margin-bottom: 10px;
}

.csp-insurance-header {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.csp-insurance-radio {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 12px;
}

.csp-insurance-info {
    flex: 1;
}

.csp-insurance-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.csp-insurance-rate {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.csp-insurance-price {
    text-align: right;
    font-weight: bold;
    color: #28a745;
    font-size: 15px;
    min-width: 80px;
    margin-right: 15px;
}

.csp-insurance-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
}

/* ─── Insurance Arrow Toggle ─── */
.csp-arrow-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #28a745;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

/* ─── Insurance Coverage Collapsible ─── */
.csp-coverage-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9f9f9;
}

.csp-coverage-inner {
    padding: 20px;
    border-top: 2px solid #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #f9f9f9 100%);
}

.csp-coverage-title {
    margin-bottom: 15px;
    font-weight: 600;
    color: #059669;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.csp-coverage-body {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* ─── Extras Section ─── */
.csp-extras-list {
    margin-top: 20px;
    display: none;
}

.csp-extras-heading {
    color: #ff9800;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.csp-extras-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Extras Toggle Label ─── */
.csp-extra-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.csp-extra-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 12px;
}

.csp-extra-info {
    flex: 1;
}

.csp-extra-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.csp-extra-rate {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.csp-extra-price {
    text-align: right;
    font-weight: bold;
    color: #ff9800;
    font-size: 15px;
    min-width: 80px;
}

/* ─── Extras Summary ─── */
.csp-extras-summary {
    display: none;
    margin-top: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: white;
}

.csp-extras-summary-label {
    font-size: 14px;
    display: inline-block;
    margin-right: 10px;
}

.csp-extras-summary-amount {
    font-size: 16px;
    font-weight: bold;
}

/* ─── Debug Panel (THL) ─── */
.csp-debug-panel {
    background: #fff3cd;
    color: #333;
    padding: 15px;
    border: 2px solid #ffc107;
    margin: 15px 0;
}

.csp-debug-title {
    display: block;
    margin-bottom: 10px;
    color: #000;
    font-size: 14px;
}

.csp-debug-section-avail {
    margin-bottom: 15px;
    padding: 10px;
    background: #e8f4f8;
    border-left: 4px solid #0077cc;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.csp-debug-section-avail-title {
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

.csp-debug-section-request {
    margin-bottom: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
}

.csp-debug-section-request-title {
    font-size: 12px;
    display: block;
    margin-bottom: 8px;
}

.csp-debug-section-request-subtitle {
    font-size: 11px;
    display: block;
    margin-bottom: 5px;
}

.csp-debug-code-block {
    background: #f5f5f5;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    display: block;
    word-break: break-all;
    white-space: normal;
    overflow: visible;
    max-height: 300px;
    overflow-y: auto;
}

.csp-debug-section-response {
    margin-bottom: 15px;
    padding: 10px;
    background: #f1f8e9;
    border-left: 3px solid #558b2f;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.csp-debug-section-response-title {
    font-size: 12px;
}

.csp-debug-section-body {
    margin-bottom: 0;
    padding: 10px;
    background: #ffe0b2;
    border-left: 4px solid #e65100;
}

.csp-debug-section-body-title {
    font-size: 12px;
    display: block;
    margin-bottom: 8px;
}

/* ─── Driver Info Section ─── */
.csp-driver-info-heading-highlight {
    color: red;
}

.csp-driver-info-wrapper {
    background-color: #ececec;
    border-radius: 5px;
    margin-top: 30px;
}

.csp-form-delivery-no-margin {
    margin-bottom: 0;
}

.csp-form-row {
    padding-left: 15px !important;
    padding-bottom: 15px !important;
}

/* ─── Terms & Submit ─── */
.csp-terms-list {
    margin-left: 20px;
    padding-left: 15px;
    list-style-type: disc;
    color: #555;
    font-size: 13px;
    line-height: 1.8;
}

.csp-terms-divider {
    border-top: 1px solid #cfcfcf;
}

.csp-submit-btn-offset {
    margin-top: -30px;
}

.csp-confirmation-notice {
    color: #028578;
    margin-left: 20px;
}

.csp-confirmation-list {
    margin-left: 15px;
    padding-left: 15px;
    list-style-type: disc;
    line-height: 1.8;
}

/* ─── How to Book Step Label ─── */
.csp-step-label {
    text-align: center;
}

/* ─── Toast Notification (error) ─── */
.csp-error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    background: #d32f2f;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    z-index: 9999;
    max-width: 400px;
    animation: cspSlideIn 0.3s ease;
}

@keyframes cspSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes cspSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.csp-error-fadeout {
    animation: cspSlideOut 0.3s ease forwards;
}

/* ─── JS-Generated Sidebar Elements (for future use) ─── */
/* These classes can replace the inline styles in JS .html() calls */
.csp-sidebar-subtotal-value {
    color: #28a745;
    font-size: 15px;
}

.csp-sidebar-strikethrough {
    text-decoration: line-through;
}

.csp-sidebar-extras-item {
    background: white;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.csp-sidebar-extras-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.csp-sidebar-extras-item-info {
    flex: 1;
}

.csp-sidebar-extras-item-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.csp-sidebar-extras-item-detail {
    font-size: 12px;
    color: #666;
}

.csp-sidebar-extras-item-price {
    font-weight: bold;
    color: #ff9800;
    font-size: 14px;
    min-width: 100px;
    text-align: right;
}

.csp-sidebar-addons-subtotal {
    color: #ff9800;
    font-size: 14px;
}

.csp-sidebar-onsite-total {
    color: #ff9800;
    font-size: 15px;
}

.csp-sidebar-pay-to-us-total {
    color: #059669;
    font-size: 15px;
}

/* =============================================
   Insurance / Extras Toggle & Interaction Styles
   (moved from inline <style> block)
   ============================================= */

/* Insurance Toggle Button Styles */
.insurance-toggle {
    transition: all 0.3s ease !important;
}
.insurance-toggle:hover {
    background: #f0f8f5 !important;
    border-color: #28a745 !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15) !important;
}
.insurance-toggle input[type="radio"]:checked {
    accent-color: #28a745;
    background: #28a745;
}

/* Arrow Rotation */
.insurance-toggle-arrow {
    transition: transform 0.3s ease !important;
}
.insurance-toggle-arrow.rotated {
    transform: rotate(180deg) !important;
}

/* Extras Toggle Button Styles */
.extras-toggle {
    transition: all 0.3s ease !important;
}
.extras-toggle:hover {
    background: #fff3cd !important;
    border-color: #ff9800 !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15) !important;
}
.extras-toggle input[type="checkbox"]:checked {
    accent-color: #ff9800;
    background: #ff9800;
}
.extras-toggle input[type="checkbox"]:checked + div + div {
    color: #ff9800;
}
.extras-toggle input[type="checkbox"]:checked + div + div + div {
    color: #ff9800;
}

/* Coverage Details Collapsible */
.insurance-coverage-toggle {
    transition: max-height 0.3s ease;
}
.insurance-coverage-toggle.expanded {
    max-height: 500px !important;
}
/* Ab CSS */
.thl-extras-block .csp-extras-block-title{
	font-size: 16px!important;
}
.thl-extras-block .thl-insurance .csp-insurance-heading{
	font-size: 16px!important;
}
.thl-insurance .insurance-options .insurance-toggle.insurance-header-toggle{
	padding: 8px !important;
	border: 0px !important;
	gap: 8px;
}
.thl-insurance .insurance-options .csp-insurance-card{
	margin-bottom: 0px !important;
}
.thl-insurance .insurance-options .insurance-toggle.insurance-header-toggle .csp-insurance-name{
    font-size: 12px !important;
}
.thl-insurance .insurance-options .insurance-toggle.insurance-header-toggle .csp-insurance-rate{
    font-size: 11px !important;
}


.thl-extras-list.csp-extras-list .extras-options{
	display: grid !important;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	max-width: 100%;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.thl-extras-list .csp-extras-heading{
	font-size: 16px;
}
.thl-extras-list .extras-options .extras-toggle {
	padding: 8px !important;
}
.thl-extras-list .extras-options .extras-toggle .csp-extra-name {
    font-size: 12px !important;
}
.thl-extras-list .extras-options .extras-toggle .csp-extra-rate {
    font-size: 11px !important;
}
.thl-extras-list .extras-options {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
}
.thl-extras-list .extras-options > label.extras-toggle {
  flex: 1 1 0;
  width: 100%;
  box-sizing: border-box;
}
.csp-extra-info-main{
	display: flex;
    flex: 1;
    align-items: center;
}
@media(max-width: 600px){
	.thl-extras-list.csp-extras-list .extras-options{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.csp-extra-info-main{
		flex-direction: column;
    	align-items: flex-start !important;
	}
}
#grand-total-amount{
    color: #fff;
}