/* General Layout & Background */
body {
    background-color: #F8F8FC !important; /* Light grey background */
}

#order-standard_cart.custom-cart-design {
    padding: 20px 0;
}

.custom-main-content-row {
    display: flex;
    flex-wrap: wrap; /* Allows columns to wrap on smaller screens */
    margin-left: -15px; /* Adjust for Bootstrap row padding */
    margin-right: -15px;
}

.secondary-cart-body,
.secondary-cart-sidebar {
    padding-left: 15px;
    padding-right: 15px;
}

/* Header Styling */
.header-lined.custom-header-lined {
    border-bottom: none; /* Remove default border */
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.header-lined.custom-header-lined h1 {
    font-weight: 700;
    color: #303030;
    font-size: 36px;
}

/* Common Panel/Card Styles */
.custom-panel,
#orderSummary.custom-order-summary-box {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #E5E7EB; /* Subtle border */
}

/* Product Info */
.custom-panel .product-title {
    font-size: 24px;
    font-weight: 700;
    color: #303030;
    margin-bottom: 10px;
}

.custom-panel p:not(.product-title) {
    color: #6B7280;
    line-height: 1.5;
}

/* Form Group & Labels */
.custom-field-container {
    margin-top: 20px;
}

.custom-form-group {
    margin-bottom: 20px;
}

.custom-label {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
    display: block;
}

/* Select Box & Pricing Details */
.custom-select {
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 10px 15px;
    height: auto; /* Override Bootstrap default height */
    font-size: 16px;
    color: #303030;
    background-color: #FFFFFF;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236B7280" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.custom-select:focus {
    border-color: #6748D8;
    box-shadow: 0 0 0 0.2rem rgba(103, 72, 216, 0.25);
    outline: none;
}

/* Styling for selected option in dropdown (if possible via CSS, otherwise via JS/Smarty) */
.custom-select option[selected] {
    background-color: #EAE4FF; /* Lighter purple background for selected option */
    color: #6748D8; /* Darker purple text for selected option */
}

/* Pricing Display beside Select */
.pricing-details {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 15px; /* Spacing below select */
}

.pricing-details .setup-fee {
    background-color: #E5E7EB; /* Light grey background */
    color: #6B7280;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.pricing-details .main-price {
    font-size: 28px;
    font-weight: 700;
    color: #303030;
}

.pricing-details .per-month {
    font-size: 16px;
    color: #6B7280;
}

.pricing-details .old-price {
    font-size: 16px;
    color: #A0A0A0; /* Light grey for strikethrough price */
    text-decoration: line-through;
    margin-left: 5px;
}

/* Renewal Info */
.renewal-info {
    font-size: 14px;
    color: #6B7280;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #F3F4F6; /* Light separator */
}

/* Custom Success Alert */
.custom-alert-success {
    background-color: #EDFCF6; /* Light green background */
    color: #008761; /* Darker green text */
    border-color: #00B58D; /* Green border */
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.custom-alert-success .fas {
    margin-right: 10px;
    color: #00B58D; /* Green icon */
}

/* Sub-heading */
.sub-heading.custom-sub-heading {
    border-bottom: none; /* Remove default border */
    padding-bottom: 0;
    margin-bottom: 20px;
    position: relative;
    padding-top: 30px; /* Space from previous section */
}

.sub-heading.custom-sub-heading span {
    font-size: 20px;
    font-weight: 700;
    color: #303030;
    background: none; /* Remove default background */
    padding: 0;
}

.sub-heading.custom-sub-heading small {
    font-weight: normal;
    color: #6B7280;
}

/* Server Configuration & Custom Fields Inputs */
.custom-input {
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 10px 15px;
    height: auto;
    font-size: 16px;
    color: #303030;
    background-color: #FFFFFF;
}

.custom-input:focus {
    border-color: #6748D8;
    box-shadow: 0 0 0 0.2rem rgba(103, 72, 216, 0.25);
    outline: none;
}

.field-help-text.custom-help-text {
    font-size: 13px;
    color: #6B7280;
    margin-top: 5px;
    display: block;
}

/* Configurable Options - Checkboxes and Radios (Modern Bootstrap 4 style) */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    font-size: 16px;
    color: #303030;
    cursor: pointer;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #E5E7EB; /* Light grey unchecked background */
    border: #D1D5DB solid 1px;
    border-radius: 0.25rem;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    background-color: #6748D8; /* Primary purple checked background */
    border-color: #6748D8;
}

.custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

/* Radio Button Specifics */
.custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
}

/* Quantity Field (Type 4) */
.custom-range-slider + .irs { /* ion.rangeSlider specific styling */
    margin-top: 20px;
}

.irs--modern .irs-bar {
    background-color: #6748D8; /* Primary purple for the bar */
}

.irs--modern .irs-handle {
    border: 1px solid #6748D8;
    background-color: #6748D8;
    box-shadow: none;
}

.irs--modern .irs-from, .irs--modern .irs-to, .irs--modern .irs-single {
    background-color: #6748D8;
}

.irs--modern .irs-from::before, .irs--modern .irs-to::before, .irs--modern .irs-single::before {
    border-top-color: #6748D8;
}

/* Addons Section */
#productAddonsContainer {
    margin-top: 30px;
}

.custom-addon-panel {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    margin-bottom: 20px;
    overflow: hidden; /* For rounded corners on pricing/add section */
}

.custom-addon-panel.panel-addon-selected {
    border-color: #6748D8; /* Highlight selected addon */
    box-shadow: 0 4px 15px rgba(103, 72, 216, 0.2);
}

.custom-addon-body {
    padding: 20px;
    background-color: #FFFFFF;
}

.custom-addon-body .custom-control-label.addon-label {
    font-weight: 600;
    font-size: 18px;
    color: #303030;
    margin-bottom: 5px;
}

.custom-addon-body .addon-description {
    font-size: 14px;
    color: #6B7280;
    margin-top: 10px;
}

.custom-addon-price {
    background-color: #F8F8FC; /* Light grey background for price section */
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 700;
    color: #303030;
    text-align: right;
    border-top: 1px solid #F3F4F6;
}

.panel-add {
    background-color: #6748D8; /* Primary purple background for 'Add to Cart' area */
    color: #FFFFFF;
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.panel-add:hover {
    background-color: #553BBF; /* Slightly darker purple on hover */
}

.panel-add .fas {
    margin-right: 8px;
}

/* Order Summary Box */
#orderSummary.custom-order-summary-box {
    position: sticky; /* Makes it stick when scrolling */
    top: 20px; /* Distance from top of viewport */
    padding: 30px;
}

.custom-summary-title {
    font-size: 24px;
    font-weight: 700;
    color: #303030;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E5E7EB; /* Separator line */
}

#producttotal {
    min-height: 150px; /* Give some space for dynamic content */
    color: #303030;
}

/* Ensure pricing details inside order summary match the overall theme */
#orderSummary .summary-container {
    font-size: 16px;
}
#orderSummary .summary-container strong {
    font-weight: 600;
}
#orderSummary .summary-container .total-due {
    font-size: 20px;
    font-weight: 700;
    color: #303030;
}

/* Continue Button */
.custom-button-container {
    margin-top: 30px;
}

.custom-submit-btn {
    background-color: #6748D8; /* Primary purple */
    border-color: #6748D8;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    width: 100%; /* Make button full width */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.custom-submit-btn:hover,
.custom-submit-btn:focus {
    background-color: #553BBF; /* Slightly darker purple on hover/focus */
    border-color: #553BBF;
    color: #FFFFFF;
}

/* Override default Bootstrap alert-warning */
.alert.alert-warning.info-text-sm.custom-alert-info {
    background-color: #FFFBEB; /* Light yellow background */
    color: #92400E; /* Dark brown text */
    border-color: #FBBF24; /* Yellow border */
    border-radius: 8px;
    margin-top: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert.alert-warning.info-text-sm.custom-alert-info .fas {
    color: #FBBF24; /* Yellow icon */
    margin-right: 10px;
}

.alert.alert-warning.info-text-sm.custom-alert-info .alert-link {
    color: #92400E; /* Dark brown link */
    font-weight: 600;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .secondary-cart-body,
    .secondary-cart-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #orderSummary.custom-order-summary-box {
        position: static; /* Remove sticky on mobile */
    }
}
