/* OCTOM Plans Page Styles */

:root {
    /* Define theme-specific colors that change with light/dark mode */
    --sk-accent-color: #f0ad4e; /* Default orange */
    --sk-text-on-bg: var(--bs-body-color); /* Default to Bootstrap body color */
    --sk-bg: var(--bs-body-bg); /* Main background color */
    --sk-secondary-bg: var(--bs-secondary-bg); /* Secondary background color */
}

/* Light mode specific adjustments */
[data-bs-theme="light"] {
    --sk-accent-color: #e09000; /* More saturated orange for light mode */
    --sk-heading-text-shadow: 0 0 2px #0d6efd; /* Blue outline for headings in light mode */
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] {
    --sk-heading-text-shadow: none; /* No shadow needed in dark mode */
}

.octom-plans-container {
    margin: 2rem auto;
}

/* Add a dark page background for the plans section - updated for theme support */
.octomplans-content {
    padding: 2rem 0;
}

.table-responsive {
    overflow-x: visible; /* Prevent horizontal scrolling */
}

.plan-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: transparent;
    border: none;
    position: relative;
    margin: 5px;
    table-layout: fixed; /* Fixed table layout for better width control */
}

/* Set column widths for better space distribution */
.plan-comparison-table th:first-child,
.plan-comparison-table td:first-child {
    width: 25%; /* Feature name column */
}

.plan-comparison-table th:not(:first-child),
.plan-comparison-table td:not(:first-child) {
    width: 25%; /* Plan columns */
}

.plan-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px; /* Slightly reduced to ensure border is visible */
    overflow: hidden;
    background-color: transparent;
    border: none; /* Remove default border */
    position: relative; /* For pseudo-element positioning */
    margin: 5px; /* Space for the outline */
}

/* Add a strong visible outline around the entire table */
.plan-comparison-table::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 4px solid #f0ad4e; /* Golden border color like heading text */
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

/* Give cells distinct backgrounds - updated for theme support */
.plan-comparison-table th,
.plan-comparison-table td {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
    vertical-align: middle;
    border: 1px solid var(--bs-border-color);
}

.plan-header {
    background: linear-gradient(135deg, #d89e43 0%, #f0ad4e 100%);
    color: white;
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 1;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: none;
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0.5rem 0;
}

.plan-feature-row {
    border-bottom: 1px solid var(--bs-border-color);
}

.plan-feature-row:last-child {
    border-bottom: none;
}

.feature-name {
    padding: 1rem;
    text-align: left;
    font-weight: bold;
}

.feature-value {
    padding: 1rem;
    text-align: center;
}

/* Style for checkmarks and X marks */
.check-yes {
    font-size: 1.2rem;
    color: #28a745; /* Bootstrap success color */
    font-weight: bold;
}

.check-no {
    font-size: 1.2rem;
    color: #dc3545; /* Bootstrap danger color */
    font-weight: bold;
}

.feature-text {
    font-size: 0.8rem;
    color: var(--bs-body-color);
    margin-top: 0.25rem;
}

/* Style for plan action buttons */
.plan-action-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    border: 2px solid;
    margin-top: 1rem;
    width: 100%;
}

/* Highlight the "Pro" column */
.plan-column-highlight {
    position: relative;
    box-shadow: 0 0 15px rgba(240, 173, 78, 0.7);
    z-index: 2; /* Higher z-index for highlighted column */
    background-color: var(--bs-tertiary-bg); /* Slightly lighter for highlighted column */
}

.plan-column-highlight::before {
    /*content: "HIGH VALUE"; */
    position: absolute;
    top: -12px;
    right: 10px;
    background-color: var(--sk-heading-text);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 3;
}

/* Plan note with accent */
.plan-note {
    margin-top: 2rem;
    padding: 1rem 1rem 1rem 2rem;
    background-color: rgba(240, 173, 78, 0.1);
    border-radius: 5px;
    border: 1px solid var(--sk-heading-text);
    position: relative; /* For positioning the accent tab */
}

.plan-note::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 10px;
    background-color: #f0ad4e; /* Golden orange accent color */
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.plan-note p {
    margin: 0;
    position: relative;
    padding-left: 30px; /* Increased from 20px to add more space between icon and text */
}

.plan-note p::before {
    content: '\f05a'; /* FontAwesome info circle */
    font-family: "Font Awesome 5 Free"; 
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #f0ad4e;
    font-size: 1.2rem;
}

/* Add styles for coming soon overlay */
.plan-column-coming-soon {
    position: relative;
}

.plan-column-coming-soon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
    z-index: 1;
}

.plan-column-coming-soon .plan-price,
.plan-column-coming-soon .feature-value,
.plan-column-coming-soon .feature-name {
    position: relative;
    z-index: 2;
}

.plan-column-coming-soon .plan-action-button {
    position: relative;
    z-index: 2;
}

.coming-soon-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    top: 50%;
    transform: translateY(-50%);
}

/* Bootstrap Dark Theme Modifications */
[data-bs-theme="dark"] {
    --bs-body-bg: #121212; /* Darker background in dark mode */
    --bs-body-color: #fff; /* White text in dark mode */
}

/* Ensure table text follows the theme color */
.plan-comparison-table,
.plan-comparison-table td, 
.plan-comparison-table th,
.feature-name,
.feature-value,
.feature-text,
.plan-header p {
    color: var(--bs-body-color) !important; /* Force the text color to follow the theme */
}

/* Mobile Responsive Styles */
@media (max-width: 991px) {
    .table-responsive {
        overflow-x: auto; /* Allow horizontal scrolling on tablets */
    }
    
    .plan-comparison-table th:first-child,
    .plan-comparison-table td:first-child {
        width: 30%; /* Slightly wider feature column on tablets */
    }
}

@media (max-width: 767px) {
    /* Maintain table structure but improve responsiveness */
    .table-responsive {
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        padding-bottom: 1rem; /* Add space for potential scrollbar */
    }
    
    .plan-comparison-table {
        width: 100%;
        table-layout: fixed; /* Keep fixed layout for better column control */
        min-width: 500px; /* Ensure minimum width for content readability */
    }
    
    .plan-comparison-table th,
    .plan-comparison-table td {
        padding: 0.75rem; /* Reduce padding to fit more content */
    }
    
    .plan-header h3 {
        font-size: 1.2rem; /* Smaller header text */
    }
    
    .plan-price {
        font-size: 1.1rem; /* Smaller price text */
    }
    
    .feature-name {
        font-size: 0.9rem; /* Slightly smaller feature text */
    }
    
    /* Ensure action buttons stay on the same line */
    .plan-action-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        width: auto; /* Don't force full width */
        min-width: 90px; /* Ensure minimum button width */
        margin: 0.25rem auto; /* Center align with less margin */
        display: block; /* Display as block for consistent sizing */
    }
    
    /* Increase touch target size */
    .check-yes, .check-no {
        display: inline-block;
        min-width: 24px;
        min-height: 24px;
        line-height: 24px;
    }
    
    /* Ensure the final row with buttons maintains side-by-side layout */
    .plan-comparison-table tr:last-child td {
        text-align: center;
        vertical-align: middle;
    }
    
    /* Make sure feature text is visible and aligned */
    .feature-text {
        display: block;
        text-align: center;
        margin-top: 0.25rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .plan-header h3 {
        font-size: 1rem;
    }
    
    .plan-price {
        font-size: 1rem;
    }
    
    .plan-comparison-table {
        min-width: 400px; /* Slightly smaller minimum width */
    }
    
    /* Improve button sizing for very small screens */
    .plan-action-button {
        min-width: 80px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Touch interaction styles */
@media (max-width: 767px) {
    /* Active state for touch feedback */
    .feature-value.active-cell {
        background-color: rgba(240, 173, 78, 0.2);
        transform: scale(0.98);
        transition: all 0.15s ease-in-out;
    }
    
    /* Make touch areas more obvious */
    .feature-value {
        position: relative;
        transition: all 0.2s ease-out;
    }
    
    /* Add subtle ripple effect */
    .feature-value::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .feature-value.active-cell::after {
        opacity: 1;
    }
    
    /* Improved touch targets for buttons */
    .plan-action-button {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
