/* Basic Reset and Font */
/* Avoid styling body, html, div, * directly */
h1, h2, h3, p, label, input, select, button, textarea, main, section {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    /* Apply box-sizing more specifically */
    box-sizing: border-box;
}

/* Apply box-sizing to all descendants of the main container */
#robots-generator-container *,
#robots-generator-container *::before,
#robots-generator-container *::after {
     box-sizing: border-box;
}


#robots-generator-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background-color: #f4f7f6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    margin-top: 20px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 8px;
}

.generator-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.generator-section p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #555;
}

/* Form Elements */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 10px; /* Spacing between inputs */
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

textarea {
    font-family: monospace; /* Good for code */
    line-height: 1.4;
    background-color: #ecf0f1;
    color: #2c3e50;
    resize: vertical; /* Allow vertical resizing */
}

select {
    cursor: pointer;
}

/* Radio Buttons */
.option-group label {
    display: inline-block; /* Place labels side-by-side */
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}

.option-group input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle; /* Align radio button with text */
    cursor: pointer;
}

/* Specific Robot Options */
.robot-option {
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Space out name and controls */
    align-items: center; /* Vertically align items */
    padding: 8px 0;
    border-bottom: 1px dashed #eee; /* Separator */
}
.robot-option:last-child {
    border-bottom: none;
}

.robot-option .robot-name {
    font-weight: bold;
    min-width: 120px; /* Ensure names align nicely */
    padding-right: 10px; /* Add some space */
}

.robot-option .access-controls label {
    display: inline-block;
    margin-left: 15px;
    margin-bottom: 0; /* Override default block label margin */
    font-weight: normal;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-right: 10px; /* Space between buttons */
    background-color: #bdc3c7; /* Default button color */
    color: #333;
}
button:last-child {
    margin-right: 0;
}


#add-directory-btn {
    background-color: #95a5a6;
    color: white;
}

#add-directory-btn:hover {
    background-color: #7f8c8d;
}

#create-btn {
    background-color: #2ecc71;
    color: white;
}

#create-btn:hover {
    background-color: #27ae60;
}

#download-btn {
    background-color: #3498db;
    color: white;
}

#download-btn:hover {
    background-color: #2980b9;
}

#download-btn:disabled {
    background-color: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

.generator-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Restricted Directories Styling */
.directory-input-line {
    display: flex; /* Align input and button horizontally */
    align-items: center; /* Vertically center items */
    margin-bottom: 8px; /* Space between lines */
}

.directory-input-line input.restricted-dir {
    flex-grow: 1; /* Allow input to take available space */
    margin-bottom: 0; /* Remove default bottom margin from input */
    margin-right: 8px; /* Space between input and button */
}

.remove-dir-btn {
    padding: 5px 10px; /* Smaller padding */
    background-color: #e74c3c; /* Red color for remove */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem; /* Make 'x' larger */
    line-height: 1; /* Ensure 'x' is centered vertically */
    font-weight: bold;
    flex-shrink: 0; /* Prevent button from shrinking */
    margin: 0; /* Reset margin */
}

.remove-dir-btn:hover {
    background-color: #c0392b;
}

/* Adjust Add button margin */
#add-directory-btn {
     display: inline-block; /* Make it fit content width */
     margin-top: 10px; /* Add space above the add button */
}