/**
 * Linux Pricing Tables - Frontend Styles
 */

/* Reset and Base Styles */
.lpt-pricing-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lpt-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Desktop View */
.lpt-desktop-view {
    display: block;
}

.lpt-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.lpt-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lpt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.lpt-card-header {
    margin-bottom: 1.5rem;
}

.lpt-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-align: center;
}

.lpt-pricing-info {
    margin-bottom: 2rem;
    text-align: center;
}

.lpt-monthly-cost {
    margin-bottom: 1rem;
}

.lpt-cost-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4264fb;
}

.lpt-cost-period {
    font-size: 1rem;
    color: #7f8c8d;
    margin-left: 0.5rem;
    transition: opacity 0.2s ease;
}

.lpt-implementation-cost {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.lpt-impl-amount {
    font-weight: 600;
    color: #2c3e50;
}

.lpt-band-description {
    font-size: 0.9rem;
    color: #95a5a6;
    font-style: italic;
}

/* Slider Styles */
.lpt-slider-container {
    margin-bottom: 2rem;
}

.lpt-slider-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.lpt-system-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e1e8ed;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}

.lpt-system-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4264fb;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.lpt-system-slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.lpt-system-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4264fb;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.lpt-system-slider::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.lpt-slider-value {
    text-align: center;
    font-weight: 600;
    color: #4264fb;
    font-size: 1.1rem;
}

/* Total Cost */
.lpt-total-cost {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 2px solid #e9ecef;
}

.lpt-total-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.lpt-total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
}

/* Buttons */
.lpt-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lpt-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.lpt-btn-primary {
    background: #4264fb;
    color: #fff;
    border-color: #4264fb;
}

.lpt-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.lpt-btn-secondary {
    background: #fff;
    color: #4264fb;
    border-color: #4264fb;
}

.lpt-btn-secondary:hover {
    background: #4264fb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Utilities */
.lpt-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Mobile View */
.lpt-mobile-view {
    display: none;
}

/* Category Switch */
.lpt-category-switch {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.lpt-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.lpt-toggle-label {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.lpt-toggle-label.active {
    color: #111827;
    font-weight: 600;
}

.lpt-ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

/* Robustly hide native checkbox across mobile browsers */
.lpt-ios-switch input,
.lpt-mobile-toggle-input {
    position: absolute;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.lpt-ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e5e7eb;
    transition: 0.2s ease;
    border-radius: 9999px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}

.lpt-ios-slider:before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    transition: 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.lpt-ios-switch input:checked + .lpt-ios-slider,
.lpt-mobile-toggle-input:checked + .lpt-ios-slider {
    background: #374151;
}

.lpt-ios-switch input:checked + .lpt-ios-slider:before,
.lpt-mobile-toggle-input:checked + .lpt-ios-slider:before {
    transform: translateX(20px);
}

/* Category Switch */
.lpt-switch-container {
    position: relative;
    display: flex;
    background: #e5e7eb;
    border-radius: 25px;
    padding: 4px;
    width: 300px;
    height: 50px;
    border: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lpt-switch-container input[type="radio"] {
    display: none;
}

.lpt-switch-container label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    z-index: 2;
    position: relative;
    font-size: 14px;
}

.lpt-switch-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #374151;
    border-radius: 21px;
    transition: all 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lpt-switch-container input[type="radio"]:checked + label {
    color: #fff;
}

.lpt-switch-container input[type="radio"]:last-of-type:checked ~ .lpt-switch-slider {
    transform: translateX(100%);
}

/* Mobile Card */
.lpt-mobile-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.lpt-mobile-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lpt-desktop-view {
        display: none;
    }
    
    .lpt-mobile-view {
        display: block;
    }
    
    .lpt-pricing-container {
        padding: 15px;
    }
    
    .lpt-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .lpt-mobile-card {
        padding: 1.5rem;
    }
    
    .lpt-cost-amount {
        font-size: 2rem;
    }
    
    .lpt-total-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .lpt-pricing-container {
        padding: 10px;
    }
    
    .lpt-mobile-card {
        padding: 1rem;
    }
    
    .lpt-cost-amount {
        font-size: 1.8rem;
    }
    
    .lpt-switch-container label {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Animation for live updates */
.lpt-cost-amount,
.lpt-impl-amount,
.lpt-total-amount {
    transition: all 0.3s ease;
}

.lpt-cost-amount.updating,
.lpt-impl-amount.updating,
.lpt-total-amount.updating {
    transform: scale(1.05);
    color: #4264fb;
}

/* Loading state */
.lpt-loading {
    opacity: 0.6;
    pointer-events: none;
}

.lpt-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4264fb;
    border-radius: 50%;
    animation: lpt-spin 1s linear infinite;
}

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

/* Accessibility */
.lpt-system-slider:focus {
    outline: 2px solid #4264fb;
    outline-offset: 2px;
}

.lpt-btn:focus {
    outline: 2px solid #4264fb;
    outline-offset: 2px;
}

/* Style Variations */
.lpt-style-minimal .lpt-card {
    box-shadow: none;
    border: 1px solid #e1e8ed;
}

.lpt-style-minimal .lpt-card:hover {
    transform: none;
    box-shadow: none;
}

.lpt-style-modern .lpt-card {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lpt-style-modern .lpt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* Button Style Variations */
.lpt-button-square .lpt-btn {
    border-radius: 0;
}

.lpt-button-pill .lpt-btn {
    border-radius: 50px;
}

/* WPBakery Integration Styles */
.vc_element-icon.lpt-icon {
    background-image: url('../images/icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Print styles */
@media print {
    .lpt-buttons {
        display: none;
    }
    
    .lpt-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}