/* ===============================
   Test Wrapper (CLS SAFE)
================================ */
#wc-test-wrapper {
    max-width: 900px;
    margin: 0 auto;              /* center wrapper */
    padding-top: 1px;            /* 🔑 prevents margin-collapse jump */
}

/* ===============================
   TOP BAR (Progress + Status + Timer)
================================ */
.wc-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

/* ===============================
   PROGRESS
================================ */
.wc-progress {
    flex: 1;
    min-width: 200px;
}

#wc-progress-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #333;
    text-align: left;
    font-family: sans-serif;
}

.wc-progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.wc-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 999px;
    transition: width 0.5s ease-in-out;
}

/* ===============================
   ANSWER STATUS
================================ */
.wc-status {
    display: flex;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.wc-status-item {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 50px;
    justify-content: center;
}

/* ===============================
   Timer Box
================================ */
#wc-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #ffffff;
    border: 2px solid #007bff;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: #007bff;
    box-shadow: 0 4px 10px rgba(0,123,255,0.15);
}

.wc-timer-icon {
    font-size: 16px;
}

#wc-time-text {
    min-width: 60px;
    text-align: center;
}

/* ===============================
   Questions Area
================================ */
/* QUESTION TEXT BASE */
.wc-question-text {
    margin: 30px 0;
    font-size: 18px;
    font-weight: 600;
    color: #007bff;
    text-align: left;
    font-family: 'Inter';
    line-height: 1.8;
}
#wc-test-area h4,
#wc-result-area h4 {
    margin: 30px 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #FF4500;
    font-family: 'Inter';
}

/* Only h4s with part-left and part-right */
/* Header */
.match-header {
    display: grid;
    grid-template-columns: 250px auto; /* desktop */
    column-gap: 40px;
    margin: 30px 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #FF4500;
    font-family: 'Inter';
    white-space: normal;
}

.match-header .part-left {
    line-height: 1.3;
}

.match-header .part-right {
    color: #800080;
    text-align: left;
}

/* Matching block rows */
.match-block {
    display: flex;
    flex-direction: column;
    gap: 4px; /* vertical gap between rows */
}

.match-row {
    display: grid;
    grid-template-columns: 250px auto; /* align with header */
    column-gap: 40px;
    align-items: center;
    font-size: 16px;
    font-weight: 550;
    font-family: 'Inter';
    color: #000;
}

.match-row .right {
    white-space: nowrap; /* keep right column in one line */
}
#wc-test-area h5,
#wc-result-area h5 {
    margin: 30px 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #FF00FF;
    font-family: 'Inter';
    line-height: 1.6;
}

/* PARAGRAPHS */
.wc-question-text p,
.wc-review-question p {
    margin: 30px 0;
    font-size: 17px;
    font-weight: 500;
    color: #000;
    line-height: 2;
    font-family: 'Inter';
}

/* UNORDERED LIST (• bullets) */
.wc-question-text ul,
.wc-explanation ul,
.wc-review-question ul,
.wc-review-explanation ul
 {
    margin: 10px 0 14px 22px;
    padding: 0;
}

.wc-question-text ul li,
.wc-explanation ul li,
.wc-review-question ul li,
.wc-review-explanation ul li
 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 500;
    color: #E34234;
    line-height: 1.6;
}

/* ORDERED LIST (1,2,3) */
.wc-question-text ol,
.wc-explanation ol,
.wc-review-question ol,
.wc-review-explanation ol {
    margin: 10px 0 14px 24px;
    padding: 0;
}

.wc-question-text ol li,
.wc-explanation ol li,
.wc-review-question ol li,
.wc-review-explanation ol li {
    margin: 20px;
    padding: 5px;
    font-size: 16px;
    font-weight: 550;
    color: #000;
    line-height: 1.6;
    font-family: 'Inter';
}

.match-list li {
    display: grid;
    grid-template-columns: 250px auto; /* desktop fixed columns */
    column-gap: 40px;
    align-items: center;
    font-size: 16px;
    font-weight: 550;
    font-family: 'Inter';
    padding: 0; /* remove padding to prevent pushing */
    margin: 0;  /* remove margin */
}

.match-list .left,
.match-list .right {
    text-align: left;
    white-space: nowrap;
}

/* A), B), C) style */
.wc-question-text ol[type="A"],
.wc-question-text ol[type="a"],
.wc-explanation ol[type="A"],
.wc-explanation ol[type="a"],
.wc-review-question ol[type="A"],
.wc-review-question ol[type="a"],
.wc-review-explanation ol[type="A"],
.wc-review-explanation ol[type="a"] {
    list-style-type: upper-alpha;
}

/* EMPHASIS */
.wc-question-text em,
.wc-explanation em,
.wc-review-question em,
.wc-review-explanation em
 {
    font-style: italic;
    color: #7D6608;
}

.wc-question-text strong,
.wc-explanation strong,
.wc-review-question strong,
.wc-review-explanation strong {
    font-weight: 700;
    color: #000;
}

/* INLINE CODE / TERMS (optional but nice) */
.wc-question-text code,
.wc-explanation code,
.wc-review-question code,
.wc-review-explanation code {
    background: #f4f6f8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 90%;
}


/* ===============================
   Options
================================ */
.wc-option ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wc-option {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #fff;
    transition: all 0.3s ease;

    font-size: 17px;
    font-family: 'Inter';
    color: #000;
    font-weight: 600;

    line-height: 1.65;          /* 🔑 fixes Telugu vertical feel */
    padding-top: 14px;          /* 🔑 subtle downward shift */
    padding-bottom: 10px;
}

.wc-option:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

/* Correct / Wrong States */
.wc-correct {
    border-color: #28a745;
    background: #e9f7ef;
}

.wc-wrong {
    border-color: #dc3545;
    background: #fdecea;
}

.wc-icon {
    width: 30px;
    height: 30px;
    margin-left: 10px;
    flex-shrink: 0;
    stroke-width: 3;
    fill: none;
}

.wc-tick {
    stroke: #0a8f08;   /* strong green */
}

.wc-cross {
    stroke: #d10000;   /* strong red */
}


/* ===============================
   Explanation
================================ */
.wc-explanation {
    margin-top: 12px;
    padding: 10px 5px 10px 10px;
    background: #f1f5ff;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    font-size: 17px;
    font-family: 'Inter';
    text-align: left;
    color: #000;
    font-weight: 500;
    line-height: 1.8;
}

/* ===============================
   Next Button
================================ */
/* ===============================
   Next Button (Primary Action)
================================ */
#wc-next-btn {
    float: right;
    margin-top: 20px;
    padding: 12px 26px;
    background-color: #1e6fe3;   /* calmer, professional blue */
    font-family: sans-serif;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(30, 111, 227, 0.25);
    transition: 
        background-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Disabled state */
#wc-next-btn:disabled {
    background-color: #b6c6e3;
    box-shadow: none;
    cursor: not-allowed;
}

/* Hover (desktop only) */
#wc-next-btn:hover:not(:disabled) {
    background-color: #155ac0;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 111, 227, 0.35);
}

/* ===============================
   Result Area
================================ */
#wc-result-area {
    max-width: 900px;
    margin: 20px auto;
}

.wc-result-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.wc-result-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* Result Stats */
.wc-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.wc-result-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.wc-result-box:hover {
    transform: translateY(-3px);
}

.wc-result-box span {
    display: block;
    font-size: 28px;
    margin-bottom: 5px;
}

.wc-result-box strong {
    font-size: 18px;
}

.wc-correct-box { color: #28a745; }
.wc-wrong-box { color: #dc3545; }
.wc-score-box { color: #007bff; }

/* Container for navigation */
/* Container for navigation */
.wc-test-nav-result {
    display: flex;
    flex-wrap: wrap; /* allow wrapping on mobile */
    justify-content: center; /* center horizontally */
    align-items: center;
    gap: 15px; /* spacing between buttons */
    margin-top: 25px;
}

/* Retry Button - standout */
#wc-retry-btn {
    padding: 12px 35px;
    background: #007bff; /* blue for Retry */
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 100%; /* full width on mobile */
    max-width: 250px; /* optional max width for desktop */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#wc-retry-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Previous Button - Orange */
.wc-prev-test-btn,
.wc-prev-test-btn.disabled {
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 18px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1; 
    max-width: 180px; /* desktop */
    font-weight: 500;
}

.wc-prev-test-btn {
    background: #f7630c; /* Orange */
    color: #fff;
    text-decoration: none !important;
}

.wc-prev-test-btn:hover {
    background: #d15500;
    transform: translateY(-2px);
}

/* Next Button - Green */
.wc-next-test-btn,
.wc-next-test-btn.disabled {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1; 
    max-width: 180px; /* desktop */
    font-weight: 500;
}

.wc-next-test-btn {
    background: #28a745; /* Green */
    color: #fff;
    text-decoration: none !important;
}

.wc-next-test-btn:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

/* Disabled buttons */
.wc-prev-test-btn.disabled,
.wc-next-test-btn.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* ===============================
   Review Section
================================ */
.wc-review {
    margin-top: 30px;
    text-align: left;
}

.wc-review-question {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 5px solid #ccc;
    transition: all 0.3s ease;
    font-family: 'Inter';
    font-size: 18px;
    font-weight: 600;
    color: #007bff;
}

.wc-review-question.correct { border-color: #28a745; }
.wc-review-question.wrong { border-color: #dc3545; }

.wc-review-question h4 {
    margin-bottom: 12px;
    font-size: 20px;
    color: #007bff;
    font-family: 'Inter';
    font-weight: 600;
}

.wc-review-option {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 17px;
    color: #000;
    font-family: 'Inter';
    font-weight: 550;
}

.wc-review-option.correct {
    background: #e9f7ef;
    color: #28a745;
}

.wc-review-option.wrong {
    background: #fdecea;
    color: #dc3545;
}

.wc-review-explanation {
    margin-top: 10px;
    font-size: 17px;
    background: #f1f5ff;
    padding: 8px 10px;
    border-radius: 6px;
    color: #000;
    font-family: 'Inter';
    font-weight: 500;
    line-height: 1.8;
}
.wc-review-explanation p {
   margin-top: 10px;
    font-size: 17px;
    background: #f1f5ff;
    padding: 8px 10px;
    border-radius: 6px;
    color: #000;
    font-family: 'Inter';
    font-weight: 500;
    line-height: 1.8;

}

/* ===============================
   Animations
================================ */
#wc-question-box {
    animation: wcFadeIn 0.4s ease;
}

@keyframes wcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wc-explanation {
    animation: wcSlideUp 0.4s ease;
}

@keyframes wcSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide elements safely for UX */
    .wc-donot { display: none; }

.wc-test-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    max-width: 400px;
}
.wc-test-nav a {
    padding: 10px 16px;
    background: #007bff;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
.wc-test-nav a:hover { background: #0056b3; }
.wc-test-nav .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===============================
   Responsive Styles
================================ */
@media (max-width: 768px) {
    #wc-test-wrapper { padding: 0 10px; }
    .wc-question-text { font-size: 18px; margin: 20px 0; }
     .wc-question-text p{
        font-size: 20px;
    }
    
    .wc-question-text ul li,
    .wc-question-text ol li,
    .wc-explanation ul li,
.wc-review-question ul li,
.wc-review-explanation ul li,
.wc-explanation ul li,
.wc-review-question ul li,
.wc-review-explanation ul li
     {
        font-size: 18px;
    }

    .wc-question-text ul,
    .wc-question-text ol {
        margin-left: 10px;
    }
    .wc-option { font-size: 17px; padding: 10px 12px; }
    #wc-next-btn { font-size: 18px; padding: 12px 20px; 
    font-family: sans-serif;}
   /* Keep top bar stacked but allow inner row */
   .wc-status-timer-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .wc-status {
        display: flex;
        gap: 8px;
    }

    #wc-timer {
        white-space: nowrap;
    }
      .wc-test-nav-result {
        flex-direction: column; /* stack vertically */
        gap: 15px;
        align-items: center;
    }
    #wc-retry-btn {
        flex: 0 0 auto;
        max-width: 250px;
        width: 100%;
    }
    .wc-prev-test-btn,
    .wc-next-test-btn {
        flex: 0 0 auto;
        max-width: 250px; /* same as Retry */
        width: 100%;       /* full width */
    }
    .wc-result-title {
        text-align: left;
    }
}

@media (max-width: 480px) {
  
  /* Ensure shortcode fills container */
  #wc-test-wrapper {
    margin: 0;
    padding: 5px;
    width: 100%;
  }
    .wc-question-text { font-size: 18px;
    line-height: 1.7; }
    
   #wc-next-btn {
        float: none;                 /* remove float */
        display: block;
        margin: 24px auto 0;         /* center horizontally */
        padding: 12px 25px;
        font-family: sans-serif;
        font-size: 18px;
        text-align: center;
        border-radius: 12px;
    }

    /* No hover lift on mobile */
    #wc-next-btn:hover:not(:disabled) {
        transform: none;
        box-shadow: 0 6px 18px rgba(30, 111, 227, 0.25);
    }
    #wc-result-area{
        width: 100%;
    }
    .wc-result-card {
        padding: 5px;
    }
    .wc-result-grid { grid-template-columns: 1fr 1fr; }
    .wc-status-item { font-size: 13px; padding: 5px 8px; }

   .wc-option {
       font-size: 17px;
        padding-top: 10px;   /* slightly more breathing space */
        padding-bottom: 6px;
    }

    .wc-icon {
        width: 32px;
        height: 32px;
    }
    .wc-test-nav { flex-direction: column; gap: 10px; }
    .match-header,
    .match-row {
        grid-template-columns: 1fr 1fr; /* equal flexible columns */
        column-gap: 16px;
        font-size: 16px;
    }
}
