/* =========================================================
   NEXTGEN VIRTUAL ACADEMY
   API TESTING DASHBOARD
   API DASHBOARD CSS - VERSION 1
   ========================================================= */


/* =========================================================
   API PAGE
   ========================================================= */

.academy-shell {
    min-height: 100vh;
}


/* =========================================================
   API HERO
   ========================================================= */

.api-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 24px;
    margin-bottom: 24px;

    background:
        linear-gradient(
            135deg,
            #2563eb 0%,
            #3b82f6 55%,
            #60a5fa 100%
        );

    border-radius: 20px;
    overflow: hidden;

    box-shadow:
        0 14px 30px rgb(15 23 42 / 10%);
}


/* Hero main area */

.api-hero > div:first-child {
    padding: 42px 36px;
}


/* Eyebrow */

.api-hero .academy-eyebrow {
    display: inline-block;
    margin-bottom: 12px;

    color: #dbeafe;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
}


/* Main heading */

.api-hero h1 {
    margin: 0 0 12px;

    color: #ffffff !important;

    font-family:
        "Plus Jakarta Sans",
        Inter,
        Arial,
        sans-serif;

    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.1;

    letter-spacing: -1.2px;

    text-shadow:
        0 2px 8px rgb(15 23 42 / 18%);
}


/* If em is used inside heading */

.api-hero h1 em {
    color: #ffffff !important;
    font-style: normal;
}


/* Hero paragraph */

.api-hero p {
    max-width: 760px;
    margin-bottom: 24px;

    color: #eff6ff !important;

    font-size: 14px;
    line-height: 1.7;
}


/* Hero buttons */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* =========================================================
   HERO BUTTONS
   ========================================================= */

.api-hero .academy-btn {
    min-height: 42px;
    padding: 0 17px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.api-hero .academy-btn:hover {
    transform: translateY(-2px);
}


/* Primary */

.api-hero .academy-btn-primary {
    border: 1px solid #ffffff;
    background: #ffffff;
    color: #1d4ed8;

    box-shadow:
        0 5px 12px rgb(15 23 42 / 12%);
}


/* Secondary */

.api-hero .academy-btn-secondary {
    border: 1px solid rgb(255 255 255 / 45%);
    background: rgb(15 23 42 / 25%);
    color: #ffffff;
}


/* =========================================================
   API PROGRESS CARD
   ========================================================= */

.api-progress-card {
    display: flex;
    align-items: center;
    gap: 18px;

    margin: 0;
    padding: 28px;

    background: #ffffff;

    border-left: 1px solid rgb(255 255 255 / 20%);

    color: #334155;
}


.api-progress-card > span {
    color: #2563eb;

    font-family:
        "Plus Jakarta Sans",
        Inter,
        sans-serif;

    font-size: 30px;
    font-weight: 800;
}


.api-progress-card strong {
    display: block;

    color: #0f172a;

    font-size: 13px;
}


.api-progress-card p {
    margin: 6px 0 12px;

    color: #64748b !important;

    font-size: 12px;
}


/* =========================================================
   PROGRESS BAR
   ========================================================= */

.academy-progress {
    width: 150px;
    height: 7px;

    overflow: hidden;

    border-radius: 99px;

    background: #e2e8f0;
}


.academy-progress span {
    display: block;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #3b82f6,
            #2563eb
        );

    transition: width .3s ease;
}


/* =========================================================
   API TABS
   ========================================================= */

.api-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    margin-bottom: 26px;
    padding: 6px;

    border: 1px solid #e2e8f0;
    border-radius: 13px;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgb(15 23 42 / 4%);
}


.api-tab {
    min-height: 40px;
    padding: 0 17px;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: #64748b;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .18s ease,
        color .18s ease;
}


.api-tab:hover {
    background: #eff6ff;
    color: #2563eb;
}


.api-tab.active {
    background: #2563eb;
    color: #ffffff;

    box-shadow:
        0 4px 10px rgb(37 99 235 / 20%);
}


/* =========================================================
   API VIEWS
   IMPORTANT:
   Only active view is visible.
   ========================================================= */

.api-view {
    display: none;
}


.api-view.active {
    display: block;

    animation:
        apiFadeIn .25s ease;
}


@keyframes apiFadeIn {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   SECTION HEADING
   ========================================================= */

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.section-heading h2 {
    margin-bottom: 5px;

    color: #0f172a;
}


.section-heading p {
    color: #64748b;
    font-size: 13px;
}


.module-count {
    padding: 7px 11px;

    border-radius: 99px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   ROADMAP
   ========================================================= */

.roadmap-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 20px;
}


.roadmap-grid article {
    padding: 20px;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgb(15 23 42 / 4%);
}


.roadmap-grid article > span {
    display: inline-grid;

    width: 32px;
    height: 32px;

    place-items: center;

    margin-bottom: 14px;

    border-radius: 9px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 12px;
    font-weight: 800;
}


.roadmap-grid h3 {
    margin-bottom: 6px;
}


.roadmap-grid p {
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.api-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.api-summary-grid article {
    padding: 22px;

    border: 1px solid #e2e8f0;
    border-radius: 15px;

    background: #ffffff;
}


.api-summary-grid h3 {
    margin: 8px 0 5px;
}


.api-summary-grid p {
    color: #64748b;
    font-size: 12px;
}


.text-link {
    display: inline-block;

    margin-top: 14px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #2563eb;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


/* =========================================================
   LESSON LAYOUT
   ========================================================= */

.lesson-layout {
    display: grid;

    grid-template-columns:
        270px minmax(0, 1fr);

    gap: 18px;
}


/* =========================================================
   LESSON LIST
   ========================================================= */

.lesson-list {
    display: grid;
    gap: 8px;

    align-content: start;
}


.lesson-item {
    width: 100%;

    padding: 15px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;

    text-align: left;

    cursor: pointer;

    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}


.lesson-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
    transform: translateY(-1px);
}


.lesson-item.active {
    border-color: #2563eb;
    background: #eff6ff;
}


.lesson-item.completed {
    border-left: 4px solid #16a34a;
}


.lesson-number {
    display: block;

    margin-bottom: 4px;

    color: #2563eb;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}


.lesson-item strong {
    display: block;

    color: #0f172a;

    font-size: 12px;
    line-height: 1.4;
}


.lesson-status {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 10px;
}


.lesson-item.completed .lesson-status {
    color: #16a34a;
    font-weight: 700;
}


/* =========================================================
   LESSON READER
   ========================================================= */

.lesson-reader {
    min-width: 0;

    padding: 28px;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 2px 6px rgb(15 23 42 / 4%);
}


.lesson-reader h2 {
    margin-bottom: 6px;
}


.lesson-reader h3 {
    margin-top: 22px;
    margin-bottom: 9px;
}


.lesson-reader p {
    color: #64748b;
    font-size: 13px;
}


.lesson-reader ul {
    padding-left: 20px;

    color: #475569;

    font-size: 13px;
}


.lesson-reader li {
    margin-bottom: 7px;
}


.lesson-code {
    overflow-x: auto;

    margin-top: 12px;
    padding: 18px;

    border-radius: 10px;

    background: #0f172a;
    color: #e2e8f0;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 12px;
    line-height: 1.7;
}


/* =========================================================
   LESSON ACTIONS
   ========================================================= */

.lesson-actions {
    display: flex;
    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid #e2e8f0;
}


.academy-btn {
    min-height: 40px;

    padding: 0 15px;

    border-radius: 9px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.api-complete {
    border: 1px solid #2563eb;

    background: #2563eb;

    color: #ffffff;
}


.api-complete:hover {
    background: #1d4ed8;
}


.api-outline {
    border: 1px solid #2563eb;

    background: #ffffff;

    color: #2563eb;
}


.api-outline:hover {
    background: #eff6ff;
}


/* =========================================================
   PRACTICE LAB
   ========================================================= */

.lab-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 18px;
}


.request-card,
.response-card {
    min-width: 0;

    padding: 22px;

    border: 1px solid #e2e8f0;
    border-radius: 15px;

    background: #ffffff;
}


.challenge-card {
    padding: 18px;

    margin-bottom: 18px;

    border: 1px solid #bfdbfe;
    border-radius: 13px;

    background: #eff6ff;
}


.challenge-card h3 {
    margin-bottom: 7px;
}


.challenge-card p {
    margin-bottom: 6px;

    color: #64748b;

    font-size: 12px;
}


.challenge-detail {
    color: #475569;

    font-size: 12px;
}


.challenge-detail strong {
    color: #334155;
}


/* =========================================================
   REQUEST LINE
   ========================================================= */

.request-line {
    display: grid;

    grid-template-columns: 110px minmax(0, 1fr);

    gap: 9px;

    margin-bottom: 17px;
}


.request-line select,
.request-line input {
    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
    color: #334155;

    font-size: 12px;
}


.request-line select:focus,
.request-line input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgb(37 99 235 / 10%);
}


/* =========================================================
   LAB LABELS
   ========================================================= */

.request-card label {
    display: block;

    margin-bottom: 14px;

    color: #334155;

    font-size: 11px;
    font-weight: 700;
}


.request-card textarea {
    display: block;

    width: 100%;

    margin-top: 7px;

    padding: 11px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
    color: #334155;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 11px;

    resize: vertical;
}


.request-card textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgb(37 99 235 / 10%);
}


/* Disabled JSON body */

#requestBody:disabled {
    background: #f1f5f9;

    color: #94a3b8;

    border-color: #e2e8f0;

    cursor: not-allowed;
}


/* =========================================================
   LAB ACTIONS
   ========================================================= */

.lab-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 18px;
}


/* =========================================================
   RESPONSE CARD
   ========================================================= */

.response-card {
    display: flex;

    flex-direction: column;
}


.response-card > header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding-bottom: 12px;

    border-bottom: 1px solid #e2e8f0;
}


.response-card > header span:first-child {
    color: #0f172a;

    font-size: 11px;
    font-weight: 800;
}


.response-status {
    padding: 6px 10px;

    border-radius: 99px;

    font-size: 10px;
    font-weight: 800;
}


.response-status.idle {
    background: #f1f5f9;
    color: #64748b;
}


.response-status.success {
    background: #f0fdf4;
    color: #16a34a;
}


.response-status.error {
    background: #fef2f2;
    color: #dc2626;
}


#responseMeta {
    margin: 8px 0;

    color: #64748b;

    font-size: 11px;
}


#responseBody {
    flex: 1;

    min-height: 350px;

    overflow: auto;

    margin: 0;

    padding: 18px;

    border-radius: 10px;

    background: #0f172a;
    color: #e2e8f0;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 12px;
    line-height: 1.6;
}


.validation-message {
    min-height: 22px;

    margin-top: 12px;

    font-size: 12px;
    font-weight: 700;
}


.validation-message.pass {
    color: #16a34a;
}


.validation-message.fail {
    color: #dc2626;
}


/* =========================================================
   CHALLENGES
   ========================================================= */

.challenge-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


.challenge-list-card {
    padding: 20px;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    background: #ffffff;
}


.challenge-list-card.passed {
    border-color: #86efac;
    background: #f0fdf4;
}


.challenge-list-card h3 {
    margin-bottom: 7px;
}


.challenge-list-card p {
    color: #64748b;

    font-size: 12px;
}


.challenge-badge {
    display: inline-block;

    margin-bottom: 10px;

    padding: 5px 9px;

    border-radius: 99px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 10px;
    font-weight: 800;
}


.challenge-list-card.passed .challenge-badge {
    background: #dcfce7;
    color: #16a34a;
}


/* =========================================================
   CAPSTONE
   ========================================================= */

.capstone {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 20px;
    padding: 22px;

    border: 1px solid #bfdbfe;
    border-radius: 15px;

    background: #eff6ff;
}


.capstone h3 {
    margin: 7px 0;
}


.capstone p {
    max-width: 850px;

    color: #64748b;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .api-hero {
        grid-template-columns: 1fr;
    }

    .api-progress-card {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .roadmap-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .lesson-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

}


@media (max-width: 850px) {

    .lesson-layout,
    .lab-grid {
        grid-template-columns: 1fr;
    }

    .lesson-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .challenge-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .api-hero > div:first-child {
        padding: 30px 22px;
    }

    .api-hero h1 {
        font-size: 30px;
    }

    .api-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .api-tab {
        white-space: nowrap;
    }

    .roadmap-grid,
    .api-summary-grid,
    .lesson-list {
        grid-template-columns: 1fr;
    }

    .lesson-reader {
        padding: 20px;
    }

    .request-line {
        grid-template-columns: 1fr;
    }

    .capstone {
        align-items: flex-start;
        flex-direction: column;
    }

}