/**
 * Chart Wizard Component Styles
 */

.chart-wizard-container {
    /*
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    */
}

.wizard-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
}

.wizard-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 15px;
    margin: 0 0 20px 0;
}

/* The step progress bar lives in the "Step progress" block at the end of
   this file, as .cw-progress — an ordered list matching the Calendar,
   Gallery, D3 and Pricing Table wizards. */

/* Step 1: Chart Type Selection */
.chart-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chart-type-card {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chart-type-card:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.chart-type-card.selected,
.chart-type-radio:checked + .chart-type-card {
    border-color: #007bff;
    background: #e7f3ff;
    box-shadow: 0 0 20px rgba(0,123,255,0.3);
}

/*
 * The radio is hidden from view but not from the keyboard or a screen reader,
 * so the group can still be reached with Tab and moved through with the arrow
 * keys. display:none or visibility:hidden would drop it out of the tab order
 * and put us back where we started.
 */
.chart-type-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The card wears the focus ring on the hidden radio's behalf. */
.chart-type-radio:focus + .chart-type-card {
    outline: 3px solid #0056b3;
    outline-offset: 2px;
}

.chart-type-card .chart-icon {
    margin-bottom: 15px;
}

.chart-type-card h4,
.chart-type-card .chart-type-name {
    display: block;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.chart-type-card p,
.chart-type-card .chart-type-desc {
    display: block;
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.form-section h4 {
    color: #007bff;
    font-size: 18px;
    margin-bottom: 15px;
}

.data-source-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
}

/* Options Sections */
.options-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.options-section h4 {
    background: #e9ecef;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    margin: 0;
    border-bottom: 2px solid #dee2e6;
}

.options-section-content {
    padding: 20px;
}

.series-config {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.series-config .form-group {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.series-config .form-group label {
    margin-bottom: 0;
    min-width: 120px;
}

.series-config .form-group input[type="text"] {
    flex: 1;
    max-width: 300px;
}

.series-config .form-group input[type="color"] {
    width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0;
}

.series-config h5 {
    color: #555;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Chart Preview */
.chart-preview-container {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    min-height: 400px;
    height: 520px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chartPreview {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}

/* Wizard Actions */
.wizard-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.wizard-actions .btn {
    margin: 5px;
    min-width: 150px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 10px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

input[type="color"] {
    width: 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
    height: 45px !important;
    cursor: pointer !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    padding: 2px !important;
    display: inline-block !important;
}

.checkbox-inline {
    font-weight: normal;
}

.help-block {
    color: #777;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Alerts */
.alert {
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.alert-primary {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

/* Responsive Design - Tablet (768px and below) */
@media (max-width: 768px) {
    .chart-wizard-container {
        padding: 15px;
        margin: 10px auto;
    }
    
    .wizard-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .wizard-header h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .cw-progress {
        margin-bottom: 25px;
    }
    
    .chart-types-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    .chart-type-card {
        min-height: 180px;
        padding: 20px 15px;
    }
    
    .wizard-actions .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        min-width: auto;
    }
    
    .options-section-content .row .col-md-6 {
        width: 100%;
    }
    
    /* Wizard Steps - Tablet */
    /*
    .wizard-steps {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .wizard-step {
        flex: 0 1 calc(50% - 4px);
        padding: 12px;
        gap: 8px;
    }
    
    .cw-progress-title {
        font-size: 12px;
    } 
    */       
    
    /* Series config adjustments */
    .series-config .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .series-config .form-group label {
        min-width: auto;
    }
    
    .series-config .form-group input[type="text"] {
        width: 100%;
        max-width: 100%;
    }
    
    .series-config .form-group input[type="color"] {
        width: 120px !important;
        max-width: 120px !important;
    }
    
    input[type="color"] {
        width: 120px !important;
        max-width: 120px !important;
        height: 40px !important;
    }
}

/* Responsive Design - Mobile (480px and below) */
@media (max-width: 480px) {
    .chart-wizard-container {
        padding: 12px;
        margin: 5px auto;
        border-radius: 4px;
    }
    
    .wizard-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .wizard-header h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .cw-progress {
        margin-bottom: 15px;
    }
    
    .wizard-content h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }   
    
    /* Chart Type Cards */
    .chart-type-card {
        min-height: 160px;
        padding: 15px 10px;
    }
    
    .chart-type-card h4 {
        font-size: 16px;
    }
    
    .chart-type-card p {
        font-size: 12px;
    }
    
    /* Form Elements */
    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .form-section h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .options-section {
        margin-bottom: 15px;
    }
    
    .options-section h4 {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .options-section-content {
        padding: 15px;
    }
    
    .series-config {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .series-config h5 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .series-config .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .series-config .form-group label {
        margin-bottom: 5px;
        min-width: auto;
        font-size: 13px;
    }
    
    .series-config .form-group input[type="text"] {
        width: 100%;
        max-width: 100%;
    }
    
    .series-config .form-group input[type="color"] {
        width: 100px !important;
        max-width: 100px !important;
        height: 35px !important;
    }
    
    /* Global Color Input */
    input[type="color"] {
        width: 100px !important;
        max-width: 100px !important;
        height: 35px !important;
    }
    
    /* Form Group */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Alerts */
    .alert {
        padding: 12px;
        margin-bottom: 15px;
        font-size: 13px;
    }
    
    /* Chart Preview */
    .chart-preview-container {
        padding: 15px;
        margin: 15px 0;
        min-height: 300px;
    }
    
    /* Wizard Actions */
    .wizard-actions {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .wizard-actions .btn {
        display: block;
        width: 100%;
        margin: 6px 0;
        padding: 10px;
        font-size: 14px;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 320px) {
    .chart-wizard-container {
        padding: 10px;
    }
    
    .wizard-header h2 {
        font-size: 16px;
    }
    
    .cw-progress-number {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .cw-progress-title {
        font-size: 11px;
    }
    
    .wizard-content h3 {
        font-size: 16px;
    }
}

.tippy_info_label{
  display:inline-block;
  padding: 8px 0px;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
  line-height:18px;
  background:transparent;
  color:#111827;
  cursor:pointer;
}

.tabulizer-tippy-help{
  background:transparent;
  border:0;
  padding:0;
  margin-left:2px;
}
/* ---------------------------------------------------------------------------
   Step progress
   
   Matches the Calendar, Gallery, D3 and Pricing Table wizards. The old markup
   was four hand-maintained copies of a set of <div>s, one per step template,
   with the current step shown by colour alone.
   --------------------------------------------------------------------------- */

/* Content hidden visually but available to assistive technology. */
.cw-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cw-progress {
    margin-bottom: 24px;
}

.cw-progress-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.cw-progress-step {
    flex: 1 1 200px;
    border-right: 1px solid #d1d5db;
}

.cw-progress-step:last-child {
    border-right: 0;
}

.cw-progress-step > a,
.cw-progress-step > span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    height: 100%;
    box-sizing: border-box;
}

.cw-progress-step > a:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.cw-progress-step.is-current > a,
.cw-progress-step.is-current > span {
    background: #1d4ed8;
    color: #ffffff;
}

.cw-progress-step.is-done > a,
.cw-progress-step.is-done > span {
    background: #dcfce7;
    color: #14532d;
}

.cw-progress-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .16);
    font-weight: 700;
}

.cw-progress-step.is-current .cw-progress-number {
    background: rgba(255, 255, 255, .28);
}

.cw-progress-step.is-done .cw-progress-number {
    background: #15803d;
    color: #ffffff;
}

.cw-progress-title {
    display: block;
    font-weight: 600;
}

.cw-progress-sub {
    display: block;
    font-size: .82em;
    opacity: .85;
}

/* A visible focus indicator on the linkable steps. */
.cw-progress-step > a:focus {
    outline: 3px solid #1d4ed8;
    outline-offset: -3px;
}
