/* Reset */
    * { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }

    body {
        background-color: #f5f5f5;
        padding: 20px;
        color: #333;
        -webkit-user-select: none; /* Safari */
        -ms-user-select: none;     /* Internet Explorer/Edge */
        user-select: none;         /* Standard syntax */
    }

    footer {
        font-family: Arial, sans-serif !important;
        font-size: 14px !important;
    }

    .version-tag {
    position: absolute;        /* Pins it relative to the footer box */
    right: 20px;               /* Pushes it to the far right edge */
    font-size: 11px;
    opacity: 0.5;
    font-family: monospace;
    color: white;              /* Matches footer text */
}

    h1 {
        text-align: center;
        margin-bottom: 20px;
        color: #2c3e50;
    }

    section {
        margin-bottom: 20px;
    }

    input[type="checkbox"] {
        margin-right: 5px;
        transform: scale(1.1);
        cursor: pointer;
    }

    label {
        margin-right: 15px;
        cursor: pointer;
    }

    input[type="text"] {
        padding: 5px 10px;
        width: 25%;
        border-radius: 5px;
        border: 1px solid #ccc;
        margin-left: 5px;
    }

    /* Buttons */
.buttons {
    padding: 14px 0;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #007BFF;
    border-radius: 8px;
    background-color: white;
    color: #007BFF;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 160px;             
    display: inline-block;
    text-align: center;
    white-space: nowrap; 
    box-sizing: border-box;
}

.buttons:hover, .back-btn:hover {
    background-color: #007BFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}


details {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

details[open] {
    background-color: #dfe6e9;
}

summary {
    font-weight: bold;
    font-size: 16px;
    padding: 18px 20px;           /* ← bigger hitbox here */
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

details > .features-container {
    padding: 0 20px 24px 20px;
}


    .features-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 32px;
    margin: 1.5rem 0;
      }

      .feature-group {
        flex: 1 1 auto;           /* grow & shrink, but respect min-content */
        min-width: 280px;         /* prevents becoming too narrow */
        max-width: 420px;         /* optional – adjust to taste */
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 1rem 1.25rem;
        background: #fafafa;
      }

      .feature-group legend {
        font-weight: bold;
        font-size: 1.1rem;
        padding: 0 8px;
        color: #333;
      }

      .options-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 5px;
      }

      .options-list label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        line-height: 1.4;
      }

      .options-list input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #0066cc;     /* modern checkbox color – optional */
      }

      .title-links {
    width: 100%;             /* Fills the container's width */
    max-width: 100%;         /* Ensures it never overflows the container */
    box-sizing: border-box;  /* Includes padding/border in the width calculation */
}

      /* Optional: make long labels wrap nicely */
      .options-list label span {
        flex: 1;
      }

      @media (max-width: 600px) {
        .feature-group {
          flex: 1 1 100%;
          max-width: none;
        }
      }

      .scroll-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #444;
  color: white;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s, transform 0.3s;
  transform: scale(0.7);
}

.scroll-to-top.show {
  opacity: 1;
  transform: scale(1);
}


/*  */
#hidden1 {
    display: none;                /* hidden by default */
    flex-direction: row;          
    flex-wrap: wrap;              
    gap: 1.5rem;                  
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.subgroup {
    display: none;                
    flex-direction: column;
    min-width: 200px;             /* slightly wider for better readability */
    padding: 0.9rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.subgroup.active {
    display: flex;                
}

/* Consistent spacing for form elements */
.subgroup > * {
    margin: 0.5rem 0;
}

/* Align checkbox + label nicely on one line */
.subgroup .checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.subgroup input[type="checkbox"] {
    margin: 0;                    /* reset default margin */
}

.subgroup label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.subgroup input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    width: 100%; 
    box-sizing: border-box; 
    font-family: inherit;
    margin-left: 0;
}


/* Gray out disabled checkboxes and their labels */
input:disabled,
input:disabled + label {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(100%);
}

/* Ensure users can still type in inputs and textareas */
input, textarea {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Dimmed state for unused text boxes */
.dimmed-input {
    opacity: 0.4;
    pointer-events: none; /* Prevents clicking and typing */
    border-color: #ccc !important;
    transition: all 0.3s ease;
}

.site-footer {
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    width: 100%;
    margin-top: 30px;
    display: block;
    clear: both;
    width: calc(100% + 40px); 
    margin-left: -20px;       
    margin-right: -20px;      
    margin-bottom: -20px;     
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main, .content-wrapper {
    flex: 1;
}

.steps {
    display: block;
    background-color: #2c3e50; 
    color: white;              
    font-size: 1.2rem;         
    font-weight: bold;
    padding: 12px 15px;        
    width: 100%;               
    box-sizing: border-box;
    
    /* 1. Remove bottom radius so it's flat on the bottom */
    border-radius: 5px 5px 0 0; 
    border: 1px solid #2c3e50;
    
    /* 2. Remove bottom margin so the next box touches it */
    margin: 15px 0 0 0; 
}

/* Standard container for all white boxes (Step 3 AND Step 4) */
.maincontent {
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ccc;
    border-top: none; 
    border-radius: 0 0 5px 5px; 
    margin-top: 0; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* Specific logic applied ONLY to the Result area */
.output-area {
    /* INCREASED SIZE */
    min-height: 150px;        /* Taller default workspace */
    max-height: 650px;        /* Higher ceiling before scrolling starts */
    
    /* SCROLLING LOGIC */
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
}


/* Optional: Make the scrollbar look cleaner (Webkit browsers) */
.maincontent::-webkit-scrollbar {
    width: 8px;
}
.maincontent::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

#builder p {
    user-select: text;
    -webkit-user-select: text;
}
.back-btn {
	    position: fixed;
    top: 20px;
    left: 20px;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #007BFF;
    border-radius: 8px;
    background-color: white;
    color: #007BFF;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 160px;             
    display: inline-block;
    text-align: center;
    white-space: nowrap; 
    box-sizing: border-box;
}

