/* Marine Battery Lifespan Calculator Pro 2025 - COMPLETE STYLESHEET WITH ALL UPDATES */

/* Outer wrapper for centering */
.mbc-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.mbc-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    max-width: 800px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    text-align: left !important;
    position: relative !important;
}

/* Force center alignment in Elementor */
.elementor-widget-shortcode .mbc-container,
.elementor-shortcode .mbc-container {
    margin: 0 auto !important;
    display: block !important;
}

.elementor-widget-shortcode,
.elementor-shortcode {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Updated Header to Match Banner Design */
.mbc-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3f4c6b 50%, #5b6899 100%) !important;
    color: white !important;
    padding: 25px 30px !important;
    text-align: center !important;
    position: relative !important;
    border-radius: 15px 15px 0 0 !important;
    overflow: hidden !important;
}

/* Yellow accent corner - matching the banner */
.mbc-header::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 120px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
    border-radius: 0 0 40px 0 !important;
    opacity: 1 !important;
}

/* Battery icon in yellow corner */
.mbc-header::after {
    content: "🔋" !important;
    position: absolute !important;
    top: 15px !important;
    left: 25px !important;
    font-size: 22px !important;
    z-index: 2 !important;
    opacity: 1 !important;
}

.mbc-header h1 {
    font-size: 2.1em !important;
    margin: 0 0 8px 0 !important;
    font-weight: 600 !important;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    z-index: 1 !important;
}

.mbc-header p {
    font-size: 1.1em !important;
    opacity: 0.95 !important;
    margin: 0 !important;
    color: #ecf0f1 !important;
    font-weight: 400 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Subtle pattern overlay */
.mbc-header {
    background-image: 
        linear-gradient(135deg, #2c3e50 0%, #3f4c6b 50%, #5b6899 100%),
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%) !important;
}

/* Tips Section Styles - Enhanced with !important */
.mbc-tips-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%) !important;
    padding: 25px !important;
    border-bottom: 3px solid #27ae60 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mbc-tips-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
    color: #2c3e50 !important;
    text-align: center !important;
}

.mbc-tips-header h3 {
    margin: 0 0 0 10px !important;
    font-size: 1.3em !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    padding: 0 !important;
}

.mbc-tips-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    justify-items: center !important;
}

.mbc-tip-item {
    display: flex !important;
    align-items: flex-start !important;
    padding: 12px 15px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    border-left: 4px solid #3282b8 !important;
    transition: transform 0.2s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 300px !important;
}

.mbc-tip-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.mbc-tip-icon {
    font-size: 1.2em !important;
    margin-right: 10px !important;
    margin-top: 2px !important;
    min-width: 20px !important;
    flex-shrink: 0 !important;
}

.mbc-tip-text {
    font-size: 0.9em !important;
    color: #34495e !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mbc-tip-highlight {
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.mbc-calculator-body {
    padding: 40px !important;
    background: white !important;
    text-align: left !important;
}

.mbc-input-group {
    margin-bottom: 25px !important;
    background: #f8f9fa !important;
    padding: 20px !important;
    border-radius: 10px !important;
    border-left: 4px solid #3282b8 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mbc-input-group label {
    display: block !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 8px !important;
    font-size: 1.1em !important;
    text-align: left !important;
}

.mbc-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.mbc-input-group select,
.mbc-input-group input[type="number"] {
    padding: 12px 15px !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    background: white !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
}

.mbc-input-group select:focus,
.mbc-input-group input[type="number"]:focus {
    outline: none !important;
    border-color: #3282b8 !important;
    box-shadow: 0 0 0 3px rgba(50, 130, 184, 0.1) !important;
}

.mbc-toggle-group {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.mbc-toggle-btn {
    padding: 12px 20px !important;
    border: 2px solid #3282b8 !important;
    background: white !important;
    color: #3282b8 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
}

.mbc-toggle-btn.active {
    background: #3282b8 !important;
    color: white !important;
}

.mbc-toggle-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(50, 130, 184, 0.3) !important;
}

/* ENHANCED BUTTON FIXES - All previous button fixes included */
.mbc-calculate-btn {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1.2em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin: 30px 0 !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.mbc-calculate-btn:hover,
.mbc-calculate-btn:focus,
.mbc-calculate-btn:active {
    background: linear-gradient(135deg, #2471a3 0%, #0d3a5f 100%) !important;
    background-color: #2471a3 !important;
    color: white !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(15, 76, 117, 0.4) !important;
    text-decoration: none !important;
}

/* Multiple button selector specificity levels for maximum compatibility */
.mbc-container .mbc-calculate-btn {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
}

.mbc-container button.mbc-calculate-btn {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
}

button.mbc-calculate-btn {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
}

/* Even more specific selectors for stubborn themes */
.mbc-wrapper .mbc-container .mbc-calculate-btn {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
}

#mbc-calculate {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
}

.mbc-results {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: white !important;
    padding: 30px !important;
    border-radius: 10px !important;
    text-align: center !important;
    margin-top: 20px !important;
    display: none !important;
}

.mbc-results.show {
    display: block !important;
    animation: mbc-slideIn 0.5s ease !important;
}

@keyframes mbc-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mbc-result-value {
    font-size: 3em !important;
    font-weight: 700 !important;
    margin: 15px 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

.mbc-result-label {
    font-size: 1.3em !important;
    margin-bottom: 15px !important;
    opacity: 0.9 !important;
    color: white !important;
}

.mbc-result-unit {
    font-size: 1.1em !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    color: white !important;
}

.mbc-factors-breakdown {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    text-align: left !important;
}

.mbc-factors-breakdown h3 {
    margin-bottom: 15px !important;
    font-size: 1.2em !important;
    color: white !important;
}

.mbc-factor-item {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
    padding: 5px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.mbc-warning {
    background: #e74c3c !important;
    color: white !important;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    display: none !important;
}

.mbc-warning.show {
    display: block !important;
}

.mbc-info-text {
    color: #7f8c8d !important;
    font-size: 0.9em !important;
    margin-top: 8px !important;
    font-style: italic !important;
}

.mbc-input-row span {
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mbc-wrapper {
        padding: 10px !important;
    }
    
    .mbc-header h1 {
        font-size: 1.7em !important;
    }
    
    .mbc-header::before {
        width: 100px !important;
        height: 50px !important;
    }
    
    .mbc-header::after {
        top: 12px !important;
        left: 20px !important;
        font-size: 18px !important;
    }
    
    .mbc-calculator-body {
        padding: 20px !important;
    }
    
    .mbc-tips-section {
        padding: 20px !important;
    }
    
    .mbc-tips-grid {
        grid-template-columns: 1fr !important;
    }
    
    .mbc-input-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .mbc-input-group select,
    .mbc-input-group input[type="number"] {
        min-width: 100% !important;
    }
    
    .mbc-toggle-group {
        justify-content: center !important;
    }
}

/* WordPress Integration Styles - Enhanced */
.mbc-container * {
    box-sizing: border-box !important;
}

/* Override any theme styles that might interfere */
.mbc-container h1,
.mbc-container h2,
.mbc-container h3,
.mbc-container p {
    margin: 0 !important;
    padding: 0 !important;
}

.mbc-container button {
    font-family: inherit !important;
}

/* Ensure proper spacing in WordPress content */
.mbc-container {
    margin: 0 auto !important;
    clear: both !important;
}

/* Additional theme overrides for tips section */
.mbc-tips-section h3 {
    border: none !important;
    background: none !important;
    text-transform: none !important;
}

.mbc-tips-section * {
    box-sizing: border-box !important;
}

/* Force display of tips elements - Enhanced */
.mbc-tips-section,
.mbc-tips-header,
.mbc-tips-grid,
.mbc-tip-item {
    display: flex !important;
}

.mbc-tips-grid {
    display: grid !important;
}

.mbc-tips-section {
    display: block !important;
}

/* Elementor specific fixes - Enhanced */
.elementor-element .mbc-container {
    margin: 0 auto !important;
}

.elementor .mbc-container {
    margin: 0 auto !important;
}

.elementor-widget-shortcode .mbc-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Additional WordPress theme compatibility */
.entry-content .mbc-container,
.post-content .mbc-container,
.page-content .mbc-container {
    margin: 0 auto !important;
}

/* Force override for aggressive themes */
body .mbc-container {
    margin: 0 auto !important;
}

/* Extra button fixes for themes that override everything */
.wp-block .mbc-calculate-btn,
.entry-content .mbc-calculate-btn,
.post-content .mbc-calculate-btn {
    background: linear-gradient(135deg, #3282b8 0%, #0f4c75 100%) !important;
    background-color: #3282b8 !important;
    color: white !important;
}