body {
    font-family: Arial, sans-serif;
    margin: 1rem;
}
h1 {
    font-size: 2rem;
    margin-bottom: 0;
}
h2 {
    font-size: 1.2rem;
    color: #555;
}
section {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}
label {
    display: inline-block;
    margin-top: 0.5rem;
}
input[type="number"], input[type="text"] {
    width: 200px;
    margin-left: 1rem;
}
input.invalid {
    border: 2px solid red;
}
input[readonly] {
    overflow-x: auto;
    text-overflow: clip;
    white-space: nowrap;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
table, th, td {
    border: 1px solid #ccc;
}
th, td {
    padding: 0.5rem;
    text-align: center;
}
.light {
    color: #aaa;
    font-size: 0.9em;
}
.hidden {
    display: none !important;
}

/* form style for section a*/
#section-a .form-row {
    display: grid;
    grid-template-columns: 3fr; /* label + input */
    align-items: center;
    gap: 1em;
    margin-bottom: 0.8em;
}

#section-a label {
    text-align: right;
}

#section-a input {
    width: 30%;
    padding: 0.4em;
}

#section-a input[readonly] {
    background-color: #f0f0f0;  /* light grey background */
    color: #555;               /* darker text */
    border: 1px solid #ccc;     /* optional: subtle border */
    cursor: not-allowed;       /* indicates it's not editable */
    opacity: 1.0;               /* optional: make it look less active */
}

#section-b input[readonly] {
    background-color: #f0f0f0;  /* light grey background */
    color: #555;               /* darker text */
    border: 1px solid #ccc;     /* optional: subtle border */
    cursor: not-allowed;       /* indicates it's not editable */
    opacity: 1.0;               /* optional: make it look less active */
}

/* form style for section b*/
#section-b .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr; /* label + input */
    align-items: center;
    gap: 1em;
    margin-bottom: 0.8em;
}

#section-b label {
    text-align: right;
}

#section-b input {
    width: 20%;
    padding: 0.4em;
}
#section-b .pattern-row {
    display: flex;
    flex-wrap: wrap;  /* allows them to wrap if screen is too small */
    gap: 1em;         /* space between radio buttons */
    justify-content: flex-start; /* left aligned */
    margin-bottom: 1em;
}
#section-b .pattern-row label {
    flex: 0 1 160px; /* allow labels up to 160px before wrapping */
    white-space: nowrap; /* prevent internal line breaks */
}

/* form style for section c*/
#section-c .form-row {
    display: flex;
    flex-wrap: wrap;         /* allow wrapping on smaller screens */
    justify-content: space-between;
    gap: 1em;
    margin-bottom: 0.8em;
}
#section-c label {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
#section-c input {
    margin-left: 0.5em;
    padding: 0.4em;
    width: 6em;              /* fixed width to keep things uniform */
}

/*    Beam sighting distance modal pop-up styling*/
.modal {
    position: fixed;
    z-index: 10;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
}
.close-button {
    float: right;
    font-size: 20px;
    cursor: pointer;
}
#ppp-table td input {
    width: 100%;
    margin: 0;
    padding: 0.4em; /* optional, for visual spacing inside the input */
    box-sizing: border-box;
}
