/**
 * MMR Calculator Styles - Dark Modern Theme
 *
 * @package CrazyBoosting_MMR
 * @since 1.2.0
 */

/* Main Calculator Container - Dark Theme */
.cb-mmr-calculator {
    max-width: 500px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #ffffff;
}

/* General text selection styling for calculator */
.cb-mmr-calculator ::selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-calculator ::-moz-selection {
    background: #4f46e5;
    color: #ffffff;
}

/* Two-column layout system for page content - Desktop only */
@media (min-width: 1024px) {
    .cb-mmr-page-layout {
        display: flex;
        gap: 40px;
        width: 100%;
        margin: 0;
        align-items: flex-start;
    }
    
    .cb-mmr-page-content {
        flex: 1;
        padding: 20px;
        color: #ffffff;
    }
    
    .cb-mmr-page-sidebar {
        flex: 0 0 500px;
        position: static;
    }
}

/* Mobile layout - single column */
@media (max-width: 1023px) {
    .cb-mmr-page-layout {
        display: block;
        width: 100%;
        margin: 0;
    }
    
    .cb-mmr-page-content {
        width: 100%;
        padding: 20px;
        color: #ffffff;
    }
    
    .cb-mmr-page-sidebar {
        width: 100%;
        padding: 0 20px 20px 20px;
    }
}

/* Sidebar calculator styling */
.cb-mmr-calculator-sidebar {
    max-width: 500px;
    margin: 0;
}

.cb-mmr-calculator-sidebar .cb-mmr-form-container {
    position: static;
}

/* Form Container - Dark with Gradient */
.cb-mmr-form-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Header - Dark with Accent Gradient */
.cb-mmr-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cb-mmr-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cb-mmr-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Form Body */
.cb-mmr-form {
    padding: 30px 30px 25px 30px;
    background: rgba(13, 13, 13, 0.8);
}

/* Input Grid */
.cb-mmr-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

/* LoL Dual Tabs - Full Width */
.cb-mmr-inputs[data-type="lol_dual"] {
    grid-template-columns: 1fr;
    gap: 0;
}

.cb-mmr-field-group {
    display: flex;
    flex-direction: column;
}

/* Field groups within add-ons */
.cb-mmr-addons .cb-mmr-field-group {
    margin-bottom: 0;
}

.cb-mmr-addons .cb-mmr-field-group:last-child {
    margin-bottom: 0;
}

.cb-mmr-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Labels within add-ons */
.cb-mmr-addons .cb-mmr-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: 0;
}

.cb-mmr-addons label:not(.cb-mmr-field-label):not(.cb-mmr-radio-label):not(.cb-mmr-checkbox-label) {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    display: block;
}

/* Input Fields - Dark Theme */
.cb-mmr-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(31, 41, 55, 0.8);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

/* Select Dropdown Styling - More Specific Selectors */
.cb-mmr-input[type="select"],
select.cb-mmr-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select.cb-mmr-input option {
    background: #1f2937 !important;
    color: #ffffff !important;
    padding: 8px;
    border: none;
}

select.cb-mmr-input option:hover {
    background: #374151 !important;
}

select.cb-mmr-input option:checked {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

/* Fallback for older browsers */
.cb-mmr-input select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.cb-mmr-input select option {
    background: #1f2937 !important;
    color: #ffffff !important;
    padding: 8px;
    border: none;
}

/* Force select visibility and functionality */
select.cb-mmr-input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 44px !important;
    overflow: visible !important;
}

select.cb-mmr-input:focus {
    outline: 2px solid #4f46e5 !important;
    outline-offset: 2px !important;
}

/* Ensure options are visible */
select.cb-mmr-input option {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* Tooltip Icon and Popup */
.cb-mmr-tooltip-icon {
    display: inline-block;
    margin-left: 8px;
    cursor: help;
    color: #9ca3af;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.cb-mmr-tooltip-icon:hover {
    color: #4f46e5;
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

.cb-mmr-tooltip-popup {
    position: absolute;
    background: #1f2937;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: auto;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
}

/* Custom text selection styling for tooltip */
.cb-mmr-tooltip-popup::selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-tooltip-popup::-moz-selection {
    background: #4f46e5;
    color: #ffffff;
}

/* Custom Option Groups Tab Visibility */
.cb-mmr-custom-group-container {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide groups that should only show on specific tabs by default */
/* These classes are controlled by JavaScript based on active tab */

/* LP Rank Selector Styling */
.cb-mmr-lp-rank-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 5px 0 0 0;
    padding: 15px;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-mmr-rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.cb-mmr-rank-badge:hover {
    border-color: #4f46e5 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
}

.cb-mmr-rank-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Removed icon hover effect to prevent interference with badge hover */

.cb-mmr-rank-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.cb-mmr-rank-arrow {
    font-size: 24px;
    color: #4f46e5;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Division Rank Selector Styling */
.cb-mmr-division-rank-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 10px 0 5px 0;
    padding: 20px;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Rank Selector Field Group Styling */
.cb-mmr-field-group {
    margin-bottom: 5px;
}

.cb-mmr-field-group label {
    margin-bottom: 8px;
    text-align: left;
    display: block;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .cb-mmr-lp-rank-selector,
    .cb-mmr-division-rank-selector {
        flex-direction: column;
        gap: 10px;
        padding: 8px;
        margin: 5px 0 0 0;
    }
    
    .cb-mmr-rank-arrow {
        transform: rotate(90deg);
        font-size: 16px;
        margin: 5px 0;
    }
    
    .cb-mmr-rank-badge {
        min-width: 80px;
        max-width: 120px;
        padding: 8px 12px;
        margin: 0 auto;
    }
    
    .cb-mmr-rank-icon {
        width: 32px;
        height: 32px;
        max-width: 100%;
        height: auto;
    }
    
    .cb-mmr-rank-name {
        font-size: 12px;
        margin-top: 4px;
    }
}

.cb-mmr-tooltip-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.cb-mmr-tooltip-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1f2937;
}

/* Text selection styling for inputs */
.cb-mmr-input::selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-input::-moz-selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: rgba(31, 41, 55, 1);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.cb-mmr-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Add-ons Section */
.cb-mmr-addons {
    margin-bottom: 10px;
    padding: 16px;
    background: rgba(13, 13, 13, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.cb-mmr-addons-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Radio Groups */
.cb-mmr-radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    flex-wrap: wrap;
    align-items: center;
}

.cb-mmr-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(31, 41, 55, 0.5);
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-height: 44px;
    flex: 1;
    justify-content: center;
}

.cb-mmr-radio-label:hover {
    border-color: rgba(79, 70, 229, 0.5);
    background: rgba(31, 41, 55, 0.8);
    transform: translateY(-1px);
}

.cb-mmr-radio-label input[type="radio"] {
    margin: 0;
    accent-color: #4f46e5;
}

.cb-mmr-radio-label input[type="radio"]:checked + .cb-mmr-radio-text {
    color: #4f46e5;
    font-weight: 600;
}

.cb-mmr-radio-label:has(input[type="radio"]:checked) {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Checkbox */
.cb-mmr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(31, 41, 55, 0.5);
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-height: 44px;
    width: 100%;
}

.cb-mmr-checkbox-label:hover {
    border-color: rgba(79, 70, 229, 0.5);
    background: rgba(31, 41, 55, 0.8);
    transform: translateY(-1px);
}

.cb-mmr-checkbox-label input[type="checkbox"] {
    margin: 0;
    accent-color: #4f46e5;
    transform: scale(1.2);
}

.cb-mmr-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Select Dropdown */
.cb-mmr-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(31, 41, 55, 0.8);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

/* Text selection styling for select */
.cb-mmr-select::selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-select::-moz-selection {
    background: #4f46e5;
    color: #ffffff;
}

.cb-mmr-select:focus {
    outline: none;
    border-color: #4f46e5;
    background: rgba(31, 41, 55, 1);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cb-mmr-select option {
    background: #1f2937;
    color: #ffffff;
    padding: 8px;
}

/* Price Display - Dark with Glow */
.cb-mmr-price-display {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.1);
}

.cb-mmr-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb-mmr-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Price Breakdown */
.cb-mmr-breakdown {
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

/* Main Price Line - Standardized for all breakdown items */
.cb-mmr-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    gap: 12px;
    border-bottom: none; /* Remove all borders for consistency */
}

.cb-mmr-price-line:last-child {
    border-bottom: none;
}

.cb-mmr-price-label {
    color: #d1d5db;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.cb-mmr-price-label.cb-mmr-party-label,
.cb-mmr-price-label.cb-mmr-streaming-label,
.cb-mmr-price-label.cb-mmr-region-label {
    color: #e83e8c;
}

.cb-mmr-base-price,
.cb-mmr-party-price,
.cb-mmr-streaming-price,
.cb-mmr-region-price {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Legacy breakdown line - now using .cb-mmr-price-line */
/* .cb-mmr-breakdown-line styles moved to .cb-mmr-price-line */

/* Party/Streaming/Region breakdown lines - now handled by main price line */

/* Custom group breakdown lines - inherit from main price line */
.cb-mmr-custom-group-line {
    /* Inherit all styles from .cb-mmr-price-line */
    border-bottom: none; /* Remove extra borders */
}

.cb-mmr-custom-group-label {
    /* Inherit from .cb-mmr-price-label */
    color: #e83e8c;
}

.cb-mmr-custom-group-price {
    /* Inherit from .cb-mmr-base-price, etc. */
    color: #ffffff;
}

/* Percentage add-on breakdown lines - inherit from main price line */
.cb-mmr-percentage-addon-line {
    /* Inherit all styles from .cb-mmr-price-line */
    border-bottom: none; /* Remove extra borders */
}

.cb-mmr-percentage-addon-label {
    /* Inherit from .cb-mmr-price-label */
    color: #e83e8c;
}

.cb-mmr-percentage-addon-price {
    /* Inherit from .cb-mmr-base-price, etc. */
    color: #ffffff;
}

/* Total line */
.cb-mmr-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    border-top: 2px solid rgba(79, 70, 229, 0.3);
    margin-top: 8px;
}

.cb-mmr-total-line .cb-mmr-price-label,
.cb-mmr-total-line .cb-mmr-price-value {
    font-weight: 700;
}

/* Steps Info */
.cb-mmr-steps-info {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.cb-mmr-steps-text {
    font-size: 13px;
    font-weight: 500;
    color: #a5b4fc;
    font-style: italic;
}

/* Fancy MMR Button Styling */
.cb-mmr-button {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    padding: 16px 20px;
    margin: 24px 0 20px 0;
    border-radius: 12px;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add subtle shine effect on hover */
.cb-mmr-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cb-mmr-button:hover::before {
    left: 100%;
}

.cb-mmr-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.5);
    background: linear-gradient(90deg, #7c1edd 0%, #2f85ff 100%);
}

.cb-mmr-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

.cb-mmr-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.3), 0 8px 25px rgba(106, 17, 203, 0.5);
}

.cb-mmr-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(106, 17, 203, 0.2);
}

.cb-mmr-button:disabled:hover {
    transform: none;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    box-shadow: 0 2px 8px rgba(106, 17, 203, 0.2);
}

/* Error Messages */
.cb-mmr-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Responsive Design - Form elements */
@media (max-width: 768px) {
    .cb-mmr-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .cb-mmr-radio-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .cb-mmr-radio-label {
        flex: none;
        justify-content: flex-start;
        min-height: 44px; /* Better touch target */
        padding: 12px 16px;
    }
    
    .cb-mmr-addons {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .cb-mmr-calculator {
        max-width: 100%;
        margin: 0;
    }
    
    .cb-mmr-form {
        padding: 16px 16px 12px 16px;
    }
    
    /* Mobile-specific input improvements */
    .cb-mmr-input {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    /* Mobile tab improvements */
    .cb-mmr-tab-button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
        touch-action: manipulation; /* Prevents double-tap zoom */
    }
    
    /* Mobile select improvements */
    select.cb-mmr-input {
        min-height: 44px;
        font-size: 16px;
        padding: 12px 40px 12px 16px;
    }
    
    /* Mobile checkbox/radio improvements */
    .cb-mmr-checkbox-label,
    .cb-mmr-radio-label {
        min-height: 44px;
        padding: 12px 16px;
        touch-action: manipulation;
    }
    
    /* Mobile button improvements */
    .cb-mmr-submit-btn {
        min-height: 48px;
        font-size: 16px;
        padding: 14px 24px;
        touch-action: manipulation;
    }
    
    /* Mobile z-index fixes to prevent overlay issues */
    .cb-mmr-calculator {
        position: relative;
        z-index: 1;
    }
    
    .cb-mmr-form {
        position: relative;
        z-index: 1;
    }
    
    .cb-mmr-inputs {
        position: relative;
        z-index: 1;
    }
    
    .cb-mmr-tab-buttons {
        position: relative;
        z-index: 2;
    }
    
    .cb-mmr-tab-panel {
        position: relative;
        z-index: 1;
    }
    
    /* Mobile-specific spacing improvements */
    .cb-mmr-field-group {
        margin-bottom: 8px;
    }
    
    .cb-mmr-field-group label {
        margin-bottom: 6px;
        font-size: 14px;
    }
    
    /* Mobile rank selector improvements */
    .cb-mmr-lp-rank-selector,
    .cb-mmr-division-rank-selector {
        margin: 8px 0;
        padding: 12px 8px;
    }
    
    /* Mobile disabled tab message improvements */
    .cb-mmr-tab-disabled-message {
        padding: 20px 16px;
        font-size: 14px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .cb-mmr-header {
        padding: 20px;
    }
    
    .cb-mmr-title {
        font-size: 18px;
    }
    
    .cb-mmr-form {
        padding: 16px 16px 12px 16px;
    }
    
    .cb-mmr-price-value {
        font-size: 24px;
    }
}

/* Custom Option Groups Styling */
.cb-mmr-custom-group .cb-mmr-radio-group {
    gap: 8px;
}

.cb-mmr-custom-group-input {
    accent-color: #e83e8c;
}

/* Loading States */
.cb-mmr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cb-mmr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* LoL Calculator Styles */
.cb-mmr-lol-tabs {
    margin-bottom: 5px;
}

.cb-mmr-tab-buttons {
    display: flex;
    border-bottom: 2px solid #333;
    margin-bottom: 10px;
}

.cb-mmr-tab-button {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.cb-mmr-tab-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cb-mmr-tab-button.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.cb-mmr-tab-panel {
    display: none;
}

.cb-mmr-tab-panel.active {
    display: block;
}

.cb-mmr-rank-emblems {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 20px;
}

.cb-mmr-current-emblem,
.cb-mmr-desired-emblem {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #333;
    background: linear-gradient(135deg, #666 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cb-mmr-current-emblem::before,
.cb-mmr-desired-emblem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cb-mmr-current-emblem.iron-emblem,
.cb-mmr-desired-emblem.iron-emblem {
    background: linear-gradient(135deg, #8b8b8b 0%, #5a5a5a 100%);
    border-color: #6b6b6b;
}

.cb-mmr-current-emblem.bronze-emblem,
.cb-mmr-desired-emblem.bronze-emblem {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    border-color: #a0522d;
}

.cb-mmr-current-emblem.silver-emblem,
.cb-mmr-desired-emblem.silver-emblem {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    border-color: #a0a0a0;
}

.cb-mmr-current-emblem.gold-emblem,
.cb-mmr-desired-emblem.gold-emblem {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    border-color: #ffa500;
}

.cb-mmr-current-emblem.platinum-emblem,
.cb-mmr-desired-emblem.platinum-emblem {
    background: linear-gradient(135deg, #e5e4e2 0%, #b8b8b8 100%);
    border-color: #d0d0d0;
}

.cb-mmr-current-emblem.diamond-emblem,
.cb-mmr-desired-emblem.diamond-emblem {
    background: linear-gradient(135deg, #b9f2ff 0%, #87ceeb 100%);
    border-color: #87ceeb;
}

.cb-mmr-current-emblem.master-emblem,
.cb-mmr-desired-emblem.master-emblem {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff0000 100%);
    border-color: #cc0000;
}

.cb-mmr-current-emblem.challenger-emblem,
.cb-mmr-desired-emblem.challenger-emblem {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff0000 100%);
    border-color: #cc0000;
}

.cb-mmr-lp-slider {
    margin: 5px 0;
}

.cb-mmr-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

.cb-mmr-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cb-mmr-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cb-mmr-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Responsive adjustments for LoL elements */
@media (max-width: 768px) {
    .cb-mmr-tab-buttons {
        flex-direction: row; /* Keep horizontal on mobile for better UX */
        gap: 0;
        border-bottom: 1px solid #333;
    }
    
    .cb-mmr-tab-button {
        flex: 1;
        border-bottom: none;
        border-right: 1px solid #333;
        min-height: 44px;
        padding: 12px 8px;
        font-size: 13px;
        text-align: center;
        touch-action: manipulation;
    }
    
    .cb-mmr-tab-button:last-child {
        border-right: none;
    }
    
    .cb-mmr-tab-button.active {
        border-bottom: 2px solid #4CAF50;
        background: rgba(76, 175, 80, 0.1);
    }
    
    .cb-mmr-tab-button[data-disabled="true"] {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }
    
    .cb-mmr-rank-emblems {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .cb-mmr-current-emblem,
    .cb-mmr-desired-emblem {
        width: 60px;
        height: 60px;
        font-size: 10px;
    }
}

/* Boosting Range Switch Styles */
.cb-mmr-boosting-range-switch {
    margin-bottom: 10px;
}

.cb-mmr-toggle-group {
    display: flex;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.cb-mmr-toggle-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cb-mmr-toggle-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cb-mmr-toggle-button.active {
    background: #7c3aed;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.cb-mmr-mode-panel {
    display: none;
    margin-top: 20px;
}

.cb-mmr-mode-panel.active {
    display: block;
}

.cb-mmr-mode-panel .cb-mmr-field-group {
    margin-bottom: 8px;
}

.cb-mmr-mode-panel .cb-mmr-field-group:last-child {
    margin-bottom: 0;
}

/* Full Width Field Styles */
.cb-form .cb-field--full {
    width: 100%;
    max-width: 100%;
}

.cb-form.grid .cb-field--full {
    grid-column: 1 / -1;
}

.cb-form.flex .cb-field--full {
    flex: 0 0 100%;
}

#cb-lp-slider {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Fix spacing for LP slider field */
.cb-field {
    margin-bottom: 0;
    padding: 0;
}

.cb-field--full {
    margin-bottom: 0;
    padding: 0;
}

#cb-lp-block {
    margin-bottom: 0;
    padding: 0;
}

#cb-lp-block label {
    margin-bottom: 8px;
    display: block;
}

/* LoL Tabs Styles */
.cb-mmr-lol-tabs {
    width: 100%;
}

.cb-mmr-tab-buttons {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #404040;
}

.cb-mmr-tab-button {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.cb-mmr-tab-button.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

.cb-mmr-tab-button:hover {
    color: #10b981;
}

/* Disabled tab styles */
.cb-mmr-tab-button[data-disabled="true"] {
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.cb-mmr-tab-button[data-disabled="true"]:hover {
    color: #6b7280;
    background: transparent;
}

.cb-mmr-tab-button[data-disabled="true"].active {
    color: #6b7280;
    border-bottom-color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.cb-mmr-tab-disabled-message {
    text-align: center;
    padding: 40px 20px;
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid #374151;
    border-radius: 8px;
    margin: 20px 0;
}

.cb-mmr-tab-disabled-message p {
    color: #9ca3af;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

.cb-mmr-tab-content {
    width: 100%;
    grid-column: 1 / -1; /* Force full width in grid layouts */
}

.cb-mmr-tab-panel {
    display: none;
    width: 100%;
    grid-column: 1 / -1; /* Force full width in grid layouts */
}

.cb-mmr-tab-panel.active {
    display: block;
}

.cb-mmr-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #9ca3af;
}

/* Responsive adjustments for boosting range switch */
@media (max-width: 768px) {
    .cb-mmr-toggle-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .cb-mmr-toggle-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .cb-mmr-dual-range-slider .cb-mmr-range::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .cb-mmr-dual-range-slider .cb-mmr-range::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}