/**
 * 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;
    background: rgba(13, 13, 13, 0.8);
}

/* Input Grid */
.cb-mmr-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.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);
}

/* 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: 20px;
    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);
}

.cb-mmr-breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.cb-mmr-breakdown-line:last-child {
    border-bottom: none;
}

.cb-mmr-breakdown-label {
    color: #d1d5db;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.cb-mmr-breakdown-price {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Party/Streaming/Region breakdown lines */
.cb-mmr-party-label,
.cb-mmr-streaming-label,
.cb-mmr-region-label {
    color: #e83e8c;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.cb-mmr-party-price,
.cb-mmr-streaming-price,
.cb-mmr-region-price {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Custom group breakdown lines */
.cb-mmr-custom-group-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.cb-mmr-custom-group-line:last-child {
    border-bottom: none;
}

.cb-mmr-custom-group-label {
    color: #e83e8c;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.cb-mmr-custom-group-price {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Percentage add-on breakdown lines */
.cb-mmr-percentage-addon-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.cb-mmr-percentage-addon-line:last-child {
    border-bottom: none;
}

.cb-mmr-percentage-addon-label {
    color: #e83e8c;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.cb-mmr-percentage-addon-price {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 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;
}

/* Submit Button - Dark with Gradient */
.cb-mmr-submit-btn {
    width: 100%;
    padding: 24px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-mmr-submit-btn::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;
}

.cb-mmr-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.4);
}

.cb-mmr-submit-btn:hover::before {
    left: 100%;
}

.cb-mmr-submit-btn:active {
    transform: translateY(0);
}

.cb-mmr-submit-btn:disabled {
    background: rgba(75, 85, 99, 0.5);
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 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: 16px;
    }
    
    .cb-mmr-radio-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .cb-mmr-radio-label {
        flex: none;
        justify-content: flex-start;
    }
    
    .cb-mmr-addons {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .cb-mmr-calculator {
        max-width: 100%;
        margin: 0;
    }
    
    .cb-mmr-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cb-mmr-header {
        padding: 20px;
    }
    
    .cb-mmr-title {
        font-size: 18px;
    }
    
    .cb-mmr-form {
        padding: 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); }
}