/* =========================
   FORM LAYOUT
========================= */

form {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #cfd8cf;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* =========================
   LABELS
========================= */

label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
}

/* =========================
   GLOBAL INPUTS
   (SAFE VERSION - DOES NOT BREAK FLEX ROWS)
========================= */

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    font-size: 16px;
    box-sizing: border-box;
    border: 1px solid #999;
    border-radius: 6px;
}

/* Buttons separate so they don’t break layout */
button,
input[type="submit"] {
    width: auto;
    padding: 10px 14px;
    margin-top: 15px;
    background: #3d6b47;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #315639;
}

.field-narrow {
    flex: 0 0 140px;   /* tweak: 120–160px works well */
}

.field-narrow select,
.field-narrow input {
    font-size: 14px;
    padding: 6px;
}

/* allow flex layouts to control width */
.quick-entry-row input,
.quick-entry-row select {
    width: 100%;
}

/* =========================
   QUICK ENTRY ROW (Qty / Age / Sex)
========================= */

.quick-entry-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: nowrap;
}

/* each field inside row */
.field-small {
    flex: 1;
    min-width: 0;
}

/* IMPORTANT: override global input sizing inside flex row */
.quick-entry-row .field-small input,
.quick-entry-row .field-small select {
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    padding: 8px;
}

/* =========================
   TABLES
========================= */

table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 95%;
    /* max-width: 1200px; */
    background: white;
}

th, td {
    border: 1px solid #555;
    padding: 8px 10px;
}

th {
    background-color: #d9d9d9;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:nth-child(odd) {
    background-color: #ffffff;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    form {
        padding: 12px;
    }

    th, td {
        font-size: 14px;
        padding: 6px;
    }

    .quick-entry-row {
        flex-wrap: wrap;
    }

    .field-small {
        min-width: 100%;
    }
}

/* --- INLINE QUICK ENTRY FIX --- */
.quick-entry-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: flex-end;
}

.quick-entry-row .field-small {
    flex: 1;
    min-width: 0;
}

/* THIS is the important override */
.quick-entry-row input,
.quick-entry-row select {
    width: 100% !important;
    font-size: 14px;
    padding: 6px;
}

/* smaller labels for compact layout */
.quick-entry-row label {
    font-size: 12px;
    margin-top: 0;
}

/* Delete button */
.link-button {
    all: unset;
    display: inline;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #06c;
    text-decoration: underline;
    cursor: pointer;
}

/* overide input fields */
/* =========================
   NARROW FIELDS (Condition / Observer / Weather / Temp)
========================= */

.field-narrow {
    flex: 0 0 140px;   /* fixed narrow width */
    max-width: 140px;
}

/* stop full-width forcing inside narrow fields */
.field-narrow select,
.field-narrow input {
    width: 100% !important;
    font-size: 14px;
    padding: 6px;
}

/* =========================
   SMALL TEMP BOX (2–3 chars)
========================= */

.field-temp {
    flex: 0 0 70px;
    max-width: 70px;
}

.field-temp input {
    width: 100% !important;
    padding: 6px;
    font-size: 14px;
    text-align: center;
}

/* =========================
   NARROW FIELD OVERRIDES
========================= */

.field-narrow {
    flex: 0 0 140px;   /* fixed narrow column */
}

/* keep selects compact */
.field-narrow select {
    width: 100%;
    font-size: 14px;
    padding: 6px;
}

/* temperature extra narrow */
.field-temp {
    flex: 0 0 70px;   /* very narrow column */
}

.field-temp input {
    width: 100%;
    font-size: 14px;
    padding: 6px;
}

/* =========================
   SMALL INPUT TYPOGRAPHY FIX
========================= */

.quick-entry-row select,
.quick-entry-row input,
.quick-entry-row textarea,
.field-small select,
.field-small input,
.field-small textarea {
    font-size: 14px !important;
    line-height: 1.2;
}

label {
    font-size: 14px;
    margin-bottom: 4px;
}

select, input, textarea {
    font-size: 14px;
}

/* =========================
   Notes field
========================= */
.notes-field {
    min-height: 100px;
}