
/* General Form Styling */
/*
 * Root container styling
 *
 * Adjustments have been made to lighten the padding and remove the
 * default background so that the results view feels more integrated
 * with the site.  The dashed border remains for delineation.
 */
#ask-assessment-root {
    padding: 1%;
    border: 2px dashed #ccc;
    /* Removed default grey background for a cleaner look */
    width: 100%;
    max-width: 65%;
    margin: 0 auto;
}

/*
 * Results wrapper styling
 *
 * Defines base typography and layout for the assessment results wrapper.
 * Using Arial and a modest line-height improves readability, while
 * position: relative allows for absolute positioning of inner elements if
 * needed.  This class should wrap the entire results output when
 * displayed on the front end.
 */
.ask-assessment-results {
    font-family: Arial, sans-serif;
    line-height: 1.4;
    position: relative;
}

.ask-email-gate-form h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
}

/* Intro Text Styling */
.ask-email-gate-form .intro {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/*
 * Gated form heading
 *
 * The heading inside the gated form uses the primary colour so
 * participants are introduced to the palette immediately.  The
 * `.ask-gated-heading` class is applied in gate-form.php and this
 * rule picks up the CSS variable `--ask-primary` injected via
 * ask_assessment_inline_vars().
 */
.ask-gated-heading {
    color: var(--ask-primary);
}

/* Responsive Form Fields */
.ask-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 10px;
}

/* Gated form submit button */
#ask-gated-form button[type="submit"] {
    background: var(--ask-primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#ask-gated-form button[type="submit"]:hover {
    /* On hover, adopt the Keep colour to foreshadow the growth theme */
    background: var(--ask-keep);
}

.ask-form-row div {
    flex: 1;
    min-width: 48%;
}

/* Input Styling */
.ask-form-row input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.ask-form-column input {
    width: 95%;
}

/* Checkbox Styling */
.ask-form-row input[type="checkbox"] {
    margin-right: 10px;
    font-size: 0.7em;
    font-weight: normal;
    text-align: left;
    width: auto;
}

/* Button Styling */
/* Gated form submit button styling
 *
 * Use the primary colour for the default state and switch to the
 * KEEP colour on hover to guide users toward the next step.  We
 * retain existing layout properties (padding, width etc.).
 */
.ask-form-row button {
    background: var(--ask-primary);
    color: white;
    padding: 12px 20px;
    font-size: 1.3em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 80%;
    margin: 0 auto;
    display: block;
    font-weight: bold;
    transition: background 0.2s ease;
}
.ask-form-row button:hover {
    background: var(--ask-keep);
}

/* Button Styling for Navigation */
/* Navigation and action buttons on the assessment form */
.prev-btn,
.next-btn,
.ask-assessment-download-pdf {
    padding: 12px 24px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 48%;
    margin: 20px 1%;
    font-weight: bold;
    background: var(--ask-primary);
    color: white;
}
/* The final "See Results" button uses the Align colour.  It shares
 * layout styles with the navigation buttons.  The align colour is
 * injected via CSS variables so administrators can control the palette.
 */
.submit-json-btn {
    padding: 12px 24px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 48%;
    margin: 20px 1%;
    font-weight: bold;
    background: var(--ask-align);
    color: #fff;
}
.ask-assessment-download-pdf {
    font-size:26px;
}

.prev-btn:hover,
.next-btn:hover,
.submit-json-btn:hover,
.ask-assessment-download-pdf:hover {
    opacity: 0.9;
}

.prev-btn:disabled,
.next-btn:disabled,
.submit-json-btn:disabled {
    background-color: #c6c6c6;
    cursor: not-allowed;
}

/* v1.9.3.3 — Chart label styling */
.ask-chart-label,
.result-chart-label {
    font-weight: 700;
    text-transform: uppercase;
}

/* v1.9.3.3 — Report body typography controlled via CSS variables */
.ask-report-wrapper p,
.ask-report-wrapper .ask-report-body p {
    font-size: var(--ask-p-size);
    line-height: var(--ask-p-lineheight);
}

/* v1.9.3.3 — Submit button uses the ALIGN colour from settings */
#ask-assessment-root .submit-json-btn,
#ask-assessment-root button.submit-json-btn {
    background-color: var(--ask-align);
    border-color: var(--ask-align);
    color: #fff;
}
#ask-assessment-root .submit-json-btn:hover,
#ask-assessment-root button.submit-json-btn:hover {
    filter: brightness(0.95);
}
#ask-assessment-root .submit-json-btn:disabled,
#ask-assessment-root button.submit-json-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner used for loading questions.  The spinner is a circular
   progress indicator drawn with CSS borders.  It rotates
   continuously using a keyframe animation defined below. */
.ask-spinner {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: ask-spin 1s linear infinite;
}

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

/* ----------------------------------------------------------------------
 * Front-end colour and typography enhancements
 *
 * The following rules utilise CSS variables injected via
 * ask_assessment_inline_vars().  Defining colours and typographic
 * settings in variables allows administrators to customise palettes
 * and font sizes through the plugin settings without editing CSS.
 *
 * The variables used here are:
 *   --ask-primary     – Primary accent colour (e.g. progress bars)
 *   --ask-align       – Align zone colour (low)
 *   --ask-shift       – Shift zone colour (medium)
 *   --ask-keep        – Keep zone colour (high)
 *   --ask-growth      – Growth colour (unused here, reserved)
 *   --ask-p-size      – Base paragraph font size (e.g. 16px)
 *   --ask-p-lineheight – Base paragraph line height (e.g. 1.6)
 *
 * When these variables are undefined they fall back to default
 * values set in ask_assessment_inline_vars().
 */

/* Question text inherits primary colour */
.ask-question-text,
.ask-question-block label,
.ask-assessment-results .ask-question-text {
    color: var(--ask-primary);
}

/* Active navigation buttons (prev/next) use primary colour */
.prev-btn:not(:disabled),
.next-btn:not(:disabled) {
    background: var(--ask-primary);
    color: #ffffff;
}
.prev-btn:not(:disabled):hover,
.next-btn:not(:disabled):hover {
    opacity: .8;
}

/* Final submit button uses align colour */
.ask-submit-button {
    background: var(--ask-align);
    color: #ffffff;
}
.ask-submit-button:hover {
    opacity: .92;
}

/* Disabled navigation buttons retain default disabled styling */
.prev-btn:disabled,
.next-btn:disabled {
    background-color: #c6c6c6;
    color: #ffffff;
    cursor: not-allowed;
}

/* Help button on results uses KEEP colour */
/*
 * The modal trigger for "How to read this report" uses the
 * `.ask-read-report-btn` class.  Bind it to the Keep colour here
 * so the front-end automatically inherits the palette defined in
 * ask_assessment_inline_vars().  On hover the opacity is reduced
 * slightly for visual feedback.
 */
.ask-read-report-btn {
    background: var(--ask-keep);
    color: #ffffff;
    padding: 12px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.ask-read-report-btn:hover {
    opacity: .92;
}

/* Typography adjustments for result paragraphs */
.ask-assessment-results p {
    font-size: var(--ask-p-size);
    line-height: var(--ask-p-lineheight);
}

/* Progress bar shown while results are being prepared.  The outer
   container defines the overall bar size and background.  The
   inner bar element is animated via CSS transitions to fill from
   0% to 100% width when its width is set in JavaScript. */
.ask-progress {
    width: 100%;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
    margin: 20px 0;
}
.ask-progress-bar {
    height: 100%;
    width: 0%;
    background: #0073aa;
    transition: width 2s ease-in-out;
}

/* Button Layout */
.ask-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.ask-navigation button:disabled {
    background-color: #c6c6c6;
    cursor: not-allowed;
}

/* Styling for Final Submit */
.ask-submit-button {
    /* Use the Align colour for the final submission button.  The layout
     * properties (padding, width, margin etc.) remain unchanged.
     */
    background: var(--ask-align);
    color: white;
    padding: 12px 24px;
    font-size: 1.3em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 80%;
    margin: 20px auto;
    display: block;
    font-weight: bold;
}
.ask-question-block {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.ask-question-block p {
    font-weight: bold;
    margin-bottom: 10px;
}

.likert-scale {
    margin: 1rem 0;
}

.likert-labels,
.likert-options {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 10px;
}

.likert-labels span {
    flex: 1;
    font-size: 0.9em;
}

.likert-options label {
    flex: 1;
    background: #fff;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 5px;
}

.likert-options label:hover {
    background: #f0f0f0;
}

/* Testing Styles */ 

.result-card {
    padding: 40px;
    background: #fff;
    border: 1px dotted #666;
    margin-top: 20px;
    box-shadow: 2px 2px 4px #ccc;
}
.result-card h2 {
    font-size: 2em;
    text-transform: uppercase;
    font-weight: 600;
}
.result-card h3 {
    color: darkseagreen;
    font-size: 1.5em;
    font-weight: 600;
    border-bottom: 2px dotted;
}


#json-radio-form label {
    text-transform: capitalize;
    font-size: 17px;

}
.item-title {
    font-size: 22px;
    padding: 10px 0px;
    /* Use the primary colour for question numbering and text */
    color: var(--ask-primary);
}
button.submit-json-btn {
    /* Ensure the final results button adopts the Align colour.  This
     * selector targets button elements specifically in case other
     * selectors override the class declaration.  The colour will
     * default to var(--ask-align) defined in ask_assessment_inline_vars().
     */
    background: var(--ask-align);
    color: white;
}
button.submit-json-btn:hover {
    opacity: .92;
}

/* Results Page */ 
/*
 * Results container
 *
 * Simplify the padding and margin.  Background and dotted border are
 * retained while the outer spacing is tightened.  Padding is handled
 * by individual components.
 */
.ask-assessment-results-container {
    background: #fff;
    border: #ccc 2px dotted;
    /* Padding and margin removed for cleaner integration */
}
.ask-assessment-results-container h4 {
    font-size: 1.3em;
}
.ask-assessment-results-container h5 {
    color: darkseagreen;
    font-size: 1.5em;
    padding: 0px;
    margin: 0px;
}

/*
 * Scoped H2 styling
 *
 * Some installations reported that the plugin’s H2 styling was impacting
 * global headings across the site.  To avoid unwanted side effects, we
 * explicitly scope generic H2 styles to the assessment results and root
 * containers.  These rules provide modest typography without
 * overriding site-specific colours (which are handled inline in the PHP
 * templates).  If your theme defines its own heading styles, they will
 * continue to apply outside the results view.
 */
.ask-assessment-results h2,
#ask-assessment-root h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    text-transform: none;
    /* Use CSS variable for H2 size if defined */
    font-size: var(--ask-h2-size, 1.3em) !important;
}

/* Custom heading sizing for results pages.  These rules leverage
 * variables injected via ask_assessment_inline_vars() to allow
 * administrators to control the typography of report headings.
 */
/* Apply custom heading sizes for H1 and H3 via CSS variables.  H2 is handled
 * by the scoped override above to avoid duplicate declarations. */
.ask-assessment-results h1,
#ask-assessment-root h1 {
    font-size: var(--ask-h1-size, 2em) !important;
}
.ask-assessment-results h3,
#ask-assessment-root h3 {
    font-size: var(--ask-h3-size, 1.2em) !important;
}


/* Styling for Radio Buttons */
.ask-radio input[type="radio"] {
    margin-right: 10px;
}

/* chart styles */
.ask-vertical-chart {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.ask-vertical-chart-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 220px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

.ask-chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
}

/* Bar element: width is 100% of its parent; height proportional to percentage value */
.ask-chart-bar {
  width: 100%;
  height: calc((var(--bar-height, 0) / 100) * 150px);
  /* Each bar uses a CSS variable to determine its colour, set inline on the column */
  background-color: var(--bar-color, #3498db);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  margin-bottom: 10px;
}

.ask-chart-label {
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  color: #333;
  margin-top: 5px;
  max-width: 60px;
  word-wrap: break-word;
}

.ask-chart-value {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

/* Grid lines for reference */
/* .ask-vertical-chart-container:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  bottom: 30px;
  background: linear-gradient(to bottom, transparent 19.9%, #e0e0e0 20%, transparent 20.1%,
                               transparent 39.9%, #e0e0e0 40%, transparent 40.1%,
                               transparent 59.9%, #e0e0e0 60%, transparent 60.1%,
                               transparent 79.9%, #e0e0e0 80%, transparent 80.1%);
  z-index: 0;
} */
/* chart styles */
/* Mobile responsiveness */
@media (max-width: 600px) {
    .ask-form-row div {
        min-width: 100%; /* Stack columns on mobile */
    }

    .likert-options {
        flex-direction: column; /* Stack radio buttons vertically on mobile */
    }
    #json-radio-form label {
    display: block;
    padding: 5px;
}
.ask-assessment-download-pdf {
    font-size:18px;
    width: 100%;
}
}


/*
 * Version 1.6.5.2 enhancements
 *
 * These rules override and augment existing styles to deliver the
 * requested refinements to the results interface.  By grouping
 * overrides at the end of the stylesheet we ensure they win on
 * specificity without affecting upstream styles.
 */

/* Domain accordion headings: reduce font size, uppercase, dotted underline and spacing */
.ask-assessment-results .domain-box summary,
#ask-assessment-root .domain-box summary {
    font-size: 1.3em;
    text-transform: uppercase;
    border-bottom: 1px dotted #c9ced6;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Override default heading styling inside the summary so the <h2>
   inherits our desired size, casing and dotted underline.  Without
   this, some themes may override font sizes on <h2> elements. */
.ask-assessment-results .domain-box > summary h2,
#ask-assessment-root .domain-box > summary h2 {
    margin: 0;
    font-size: 1.3em;
    text-transform: uppercase;
    border-bottom: 1px dotted #c9ced6;
    padding-bottom: 5px;
    font-weight: 700;
}

/* Ensure domain summary <h2> inherits the font size and spacing */
.ask-assessment-results .domain-box summary h2 {
    margin: 0;
    font-size: inherit;
    font-weight: 700;
}

/* Space between result cards and outer wrap */
.ask-assessment-results .domain-box {
    margin-bottom: 32px;
    padding: 0;
}

/* Clean card borders and remove inner nested borders */
.ask-assessment-results .persona-card {
    border: 1px solid #e6ecf5;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
    margin-bottom: 14px;
}

/* Center the PDF download button on the results page */
.ask-assessment-results-container #ask_assessment_download_pdf {
    display: block;
    margin: 24px auto;
    width: 80%;
    font-size: 1.3em;
}

/* Remove border from the results wrapper and add padding for breathing room */
.ask-assessment-results {
    border: none !important;
    padding: 20px;
}

/* Style the download message below the button */
.ask-assessment-results-container .download-ajax-message {
    text-align: center;
    font-size: 0.9em;
    margin-top: 8px;
    color: #666;
}

/* Hide default details arrow marker on summary so we can use our own chevron */
details.domain-box summary::-webkit-details-marker {
    display: none;
}

/*
 * v1.6.5.2-patched overrides
 *
 * Apply Montserrat font across the results interface, remove borders
 * on the root and results wrappers, and enforce domain heading sizing.
 */

.ask-assessment-results,
#ask-assessment-root {
    font-family: 'Montserrat', sans-serif;
    border: none !important;
}

/* Override domain heading sizes and styling */
.ask-assessment-results .domain-box summary,
#ask-assessment-root .domain-box summary,
.ask-assessment-results .domain-box > summary h2,
#ask-assessment-root .domain-box > summary h2 {
    font-size: 1.3em !important;
    text-transform: uppercase;
    border-bottom: 1px dotted #c9ced6;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Chevron icon styling: rotates on open */
.ask-card-chevron {
    margin-left: 0.4em;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}
.domain-box[open] .ask-card-chevron {
    transform: rotate(180deg);
}


/* Upgrade button */
.ask-upgrade-btn{
  display:inline-flex;align-items:center;gap:8px;
  background: var(--ask-primary,#4D7CFE);
  color:#fff;border:none;border-radius:999px;
  padding:10px 16px;font-weight:600;cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.08);transition:opacity .2s ease,transform .02s ease;
}
.ask-upgrade-btn:hover{opacity:.95;transform:translateY(-1px)}
.ask-upgrade-btn[disabled],.ask-upgrade-btn[data-loading='1']{opacity:.6;cursor:not-allowed;transform:none}
