/* Modern Blue/Black Price Calculator Styles */
:root {
    /* Blue/Black Palette */
    --calc-primary: #0d6efd;
    /* Modern Blue */
    --calc-primary-dark: #0b5ed7;
    --calc-secondary: #000000;
    /* Black */
    --calc-secondary-light: #212529;
    /* Dark Gray */
    --calc-bg-light: #f8f9fa;
    --calc-border: #dee2e6;
    --calc-text: #212529;
    --calc-text-muted: #6c757d;
    --calc-white: #ffffff;
    --calc-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --calc-radius: 16px;
    --calc-radius-sm: 8px;
}

/* Scoped Calculator Container */
#single-page-calculator .calculator-card {
    background: var(--calc-white);
    border-radius: var(--calc-radius);
    box-shadow: var(--calc-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Ensure clean font */
}

/* Header - Blue Gradient */
.calc-header {
    background: linear-gradient(135deg, #0d6efd 0%, #000000 100%);
    padding: 60px 30px;
    color: var(--calc-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calc-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--calc-white);
    transform: skewY(-3deg);
}

.calc-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calc-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--calc-white);
}

.calc-header p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

/* Progress Steps */
.calc-progress {
    display: flex;
    justify-content: center;
    padding: 40px 20px 20px;
    position: relative;
    z-index: 2;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin: 0 20px;
    opacity: 0.5;
    transition: all 0.3s;
}

.progress-step.active {
    opacity: 1;
    transform: translateY(-5px);
}

.step-circle {
    width: 50px;
    height: 50px;
    background: var(--calc-white);
    border: 2px solid var(--calc-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--calc-text-muted);
    font-size: 18px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.progress-step.active .step-circle {
    border-color: var(--calc-primary);
    background: var(--calc-primary);
    color: var(--calc-white);
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.3);
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--calc-text);
}

/* Content Area */
.calc-content {
    padding: 40px;
}

/* Custom Grid System for Calculator to avoid conflicts */
.calc-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Cards - Category */
.calc-card-category {
    background: var(--calc-white);
    border: 1px solid var(--calc-border);
    border-radius: var(--calc-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.calc-card-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--calc-primary);
}

.calc-card-category .icon-wrapper {
    width: 70px;
    height: 70px;
    background: #eef5ff;
    /* Light Blue BG */
    color: var(--calc-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    transition: all 0.3s;
}

.calc-card-category:hover .icon-wrapper {
    background: var(--calc-primary);
    color: var(--calc-white);
    transform: rotate(10deg);
}

.calc-card-category h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--calc-secondary-light);
}

.calc-card-category p {
    font-size: 13px;
    color: var(--calc-text-muted);
    line-height: 1.5;
}

/* Cards - Pricing */
.calc-card-pricing {
    background: var(--calc-white);
    border: 2px solid var(--calc-border);
    border-radius: var(--calc-radius);
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.calc-card-pricing:hover {
    border-color: var(--calc-primary);
    background: #f8fbff;
}

.calc-card-pricing.selected {
    border-color: var(--calc-primary);
    background: #eef5ff;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.15);
}

.calc-card-pricing .price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calc-card-pricing h4 {
    font-size: 20px;
    font-weight: 800;
    color: var(--calc-secondary);
    margin: 0;
}

.calc-card-pricing .price-bage {
    background: var(--calc-secondary);
    /* Black Badge */
    color: var(--calc-white);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}

.calc-card-pricing.selected .price-bage {
    background: var(--calc-primary);
    /* Blue Badge on select */
}

.calc-card-pricing p {
    font-size: 14px;
    color: var(--calc-text-muted);
    margin-bottom: 0;
}

/* Modules List - Modern Toggle Style */
/* Modules List - Next Gen Style */
.calc-module-item {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border: 1px solid var(--calc-border);
    padding: 24px;
    border-radius: var(--calc-radius);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.03),
        -5px -5px 15px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.calc-module-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--calc-radius);
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.calc-module-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(13, 110, 253, 0.3);
}

.calc-module-item:hover::before {
    opacity: 1;
}

.calc-module-item.selected {
    border-color: var(--calc-primary);
    background: #f0f7ff;
    box-shadow: 0 10px 40px rgba(13, 110, 253, 0.2);
}

.calc-module-item.selected::before {
    background: linear-gradient(135deg, var(--calc-primary), #60a5fa);
    opacity: 1;
}

/* Custom Tech Switch */
.calc-module-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 25px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-module-item input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.calc-module-item input[type="checkbox"]:checked {
    background: var(--calc-primary);
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.4);
}

.calc-module-item input[type="checkbox"]:checked::after {
    transform: translateX(22px);
    background: #fff;
}

/* Module Info Typography */
.calc-module-info h5 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--calc-secondary);
    transition: color 0.3s;
}

.calc-module-item.selected .calc-module-info h5 {
    color: var(--calc-primary);
}

.calc-module-price {
    font-weight: 800;
    color: var(--calc-secondary);
    font-size: 16px;
    background: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
}

.calc-module-item.selected .calc-module-price {
    color: var(--calc-primary);
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.15);
}

/* Sidebar */
/* Sidebar - Dark & Modern */
.summary-sidebar {
    background: #111111 !important;
    /* Deep Black */
    color: var(--calc-white) !important;
    border-radius: var(--calc-radius);
    padding: 30px;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-sidebar h4 {
    color: var(--calc-white);
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    /* Increased opacity */
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-item .item-name {
    font-weight: 500;
    color: #ffffff;
    /* Explicitly White */
}

.summary-item .item-price {
    color: var(--calc-white);
    font-weight: 600;
}

.total-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.total-row.grand {
    font-size: 22px;
    color: var(--calc-white);
    font-weight: 800;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    align-items: center;
}

.total-row.grand strong {
    color: var(--calc-primary);
    text-shadow: 0 0 15px rgba(13, 110, 253, 0.4);
}

/* Currency Section */
.currency-section {
    text-align: center;
}

.currency-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.currency-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.curr-symbol {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 2px;
}

.curr-val {
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}

/* Buttons inside Sidebar */
.calc-btn-primary {
    background: var(--calc-primary);
    color: var(--calc-white);
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--calc-radius-sm);
    font-weight: 700;
    font-size: 16px;
    margin-top: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.3);
}

.calc-btn-primary:hover:not(:disabled) {
    background: var(--calc-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.5);
}

.calc-btn-primary:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

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

    /* Reset negative margin to prevent overlapping on mobile */
    #single-page-calculator {
        margin-top: -50px !important;
        /* Reduced negative margin */
        padding-top: 50px !important;
    }

    .calc-grid-layout {
        grid-template-columns: 1fr;
    }

    .calc-header {
        padding: 40px 20px;
    }

    .calc-header h2 {
        font-size: 26px;
    }

    .calc-progress {
        zoom: 0.8;
    }
}