/* ✅ Global Layout */
html, body {
    height: auto;     /* remove full height */
    min-height: 100%;
    margin: 0;
    font-family: monospace;
    background: #f4f4f4;
    scroll-behavior: smooth;
}

body {
    display: block;   /* remove flexbox layout */
}

/* ✅ Menu Bar */
.menu-bar {
    background: #2d465e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}
.menu-bar .logo { font-weight: bold; font-size: 18px; }
.menu-bar ul { list-style: none; display: flex; margin: 0; padding: 0; }
.menu-bar ul li { margin-left: 15px; }
.menu-bar ul li a { color: white; text-decoration: none; font-weight: bold; }
.menu-bar ul li a:hover { text-decoration: underline; }

.anchor { color: #18bc9c; text-decoration: none; font-weight: bold; }
.anchor:hover { text-decoration: underline; }

/* ✅ Banner (for ads or info) */
.banner {
    background: #18bc9c;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #ccc;
    height: 80px;
}

/* ✅ Main Container (Three Panels) */
.container {
    flex: 1; /* push footer to bottom */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "left center right";
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
    min-height: 0;
}

/* ✅ Left JSON Input */
textarea {
    grid-area: left;
    width: 100%;
    height: calc(100vh - 160px); /* Adjust based on header/banner/footer */
    padding: 10px;
    border: 1px solid #ccc;
    outline: none;
    resize: none;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

/* ✅ Center Panel (Buttons) */
.actions {
    grid-area: center;
    display: flex;
    flex-direction: column;
    justify-content: top;
    align-items: center;
    gap: 10px;
    background: #18bc9c;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
    
}

/* ✅ Buttons */
button {
    padding: 8px 14px;
    background: #18bc9c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 120px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: 1px solid #fafafa;
}
button:hover { background: #fafafa; color: #18bc9c; }

/* ✅ Right JSON Viewer */
.viewer {
    grid-area: right;
    background: #fff;
    padding: 10px;
    overflow: auto;
    border-left: 2px solid #00796B;
    font-size: 14px;
    height: calc(100vh - 160px);
    box-sizing: border-box;
}

/* ✅ Syntax Colors */
.key { color: #00796B; font-weight: bold; }
.string { color: #388E3C; }
.number { color: #D32F2F; }
.boolean { color: #8E24AA; }
.null { color: #999; font-style: italic; }

/* ✅ Footer */
footer {
    background: #2d465e;
    color: white;
    padding: 15px;
    text-align: center;
    /*flex-shrink: 0;  ensures footer stays at bottom */
}

ul {
  list-style-type: none;
}

.toggle {
    cursor: pointer;
    margin-right: 5px;
    color: blue;
}
.hidden {
    display: none;
}


/* ✅ Responsive for Mobile */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left"
            "center"
            "right";
    }
    textarea, .viewer {
        height: auto;
        min-height: 200px;
    }
    .actions {
        flex-direction: row;
        justify-content: center;
    }
    button { width: auto; padding: 6px 10px; }
}



/* --------------------------------------FAQ CSS ----------------- */
/* FAQ Section */
.faq-section {
    background: #2d465e;
    color: white;
    padding: 20px;
    margin-top: 20px;
}

.faq-section h3 {
    margin-bottom: 15px;
}

/* Individual FAQ */
.faq-item {
    background: #3b5774;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

/* Question */
.faq-question {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 15px;
    font-size: 18px;
    transition: transform 0.3s;
}

/* Answer (Initially Hidden) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: #18bc9c;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s;
}

/* Expanded State */
.faq-item.active .faq-answer {
    max-height: 200px; /* Enough to fit text */
    padding: 10px 15px;
}
.faq-item.active .faq-question::after {
    content: '-';
}



/* ------------------------------------- Privacy css ----------------------- */
.privacy-content
{
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f9f9f9;
    color: #333;
    margin: 0;
}
.content {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.content h2 {
    color: #2d465e;
    margin-top: 20px;
}

.content a {
    color: #007BFF;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}
.header {
    background: white;
    color: black;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin: 0;
}

----------------------------- About us section ----------------------------------
/* About Section Styling */
.about-section {
    background: #18bc9c;
    padding: 40px 20px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.about-container {
    margin: auto;
    background: #18bc9c;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    margin: 10px;
}

.about-container h2 {
    color: white;
    margin-bottom: 15px;
}

.about-container h3 {
    color: white;
    margin-top: 20px;
}

.about-container p {
    font-size: 16px;
    line-height: 1.6;
    color: white;
}

.about-container ul {
    padding-left: 20px;
    margin-top: 10px;
}

.about-container ul li {
    margin: 6px 0;
    color: white;
}

.json-example {
    background: #f5f5f5;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
}

.about-container a {
    color: #007BFF;
    text-decoration: none;
}

.about-container a:hover {
    text-decoration: underline;
}


/* Main tree container */
#tree {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5em;
    white-space: pre;
    background: #fff;       /* dark theme like jsonformatter */
    color: #18bc9c;
    padding: 10px;
    border-radius: 6px;
    overflow: auto;
}

/* List style */
#tree ul {
    list-style: none;
    margin: 0;
    padding-left: 20px;        /* indentation for nested objects */
    border-left: 1px solid #444; /* vertical guideline */
}

/* Keys */
#tree .key {
    color: #18bc9c;
}

/* Values */
#tree .string {
    color: #a6e22e;
}
#tree .number {
    color: #fd971f;
}
#tree .boolean {
    color: #ae81ff;
}
#tree .null {
    color: #f92672;
}

/* Toggle icon styles */
.toggle {
    width: 14px;
    display: inline-block;
    cursor: pointer;
    color: #ccc;
    font-weight: bold;
    margin-left: -18px; /* pull toggle to the far left outside the indentation */
    margin-right: 4px;
}

/* Hidden children */
.hidden {
    display: none;
}

/* Hover effect */
.toggle:hover {
    color: #b2adad;
}
