/* main.css: shared styles for the DR library download pages.
   Loaded by dr-download.php. Served at /main.css. */

body { font-family: Arial, sans-serif; margin: 40px; background-color: #f9f9f9; }

.dr-header { background: #5591d9; color: #EFEFEF; font-family: Arial, sans-serif; text-align: center; padding: 20px; margin-bottom: 20px; }
.dr-header img { max-width: 400px; width: 100%; height: auto; }
.dr-header h1 { margin: 10px 0 0 0; text-align: center;}

/* status (left) and download card (right): side by side, stacked when narrow, equal height */
.dr-columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; max-width: 1200px; margin: 0 auto; }

/* shared card look */
.status-container, .form-container { box-sizing: border-box; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* status card */
.status-container { flex: 1 1 400px; }
.status-container h2 { margin: 0 0 15px 0; padding-bottom: 10px; border-bottom: 2px solid #5591d9; font-size: 1.35em; font-weight: normal; color: #333; }
.dr-maint p { font-weight: bold; font-size: 1.05em; margin: 0 0 12px 0; color: #333; }
.dr-maint p + p { font-weight: normal; }

.status-list { list-style: none; padding: 0; margin: 15px 0 0 0; }
.status-list li { padding: 12px 0; border-bottom: 1px solid #eee; line-height: 1.4; color: #222; }
.status-list li:last-child { border-bottom: none; }

/* dated line: timestamp as a small blue pill, like the count badges in the portal */
.status-time { display: inline-block; font-size: 0.8em; color: #fff; background: #5591d9; padding: 2px 8px; border-radius: 10px; margin-right: 8px; vertical-align: middle; }

/* pinned line: no timestamp, highlighted row */
.status-pinned { font-weight: bold; color: #1d3f72; background: #f0f6ff;  padding-left: 10px; border-radius: 4px; }

.status-admin { margin-top: 15px; border-top: 1px solid #eee; padding-top: 10px; }
.status-admin summary { cursor: pointer; font-weight: bold; color: #1d3f72; margin-bottom: 10px; }
.status-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.status-edit input[type="text"] { width: auto; max-width: none; flex: 1 1 200px; }
.status-check { display: flex; align-items: center; gap: 4px; font-weight: normal; margin: 0; }

/* download card */
.form-container { flex: 2 1 350px; }

/* header bar: title on the left, catalog and start over on the right; same underline as the status title */
.dr-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #5591d9; }
.dr-toolbar strong { font-size: 1.35em; font-weight: normal; color: #333; }
.dr-toolbar-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.dr-message { margin: 0 0 15px 0; }

/* username, PIN, file ID and buttons share one row; the row wraps when the card is too narrow */
.form-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; }
.form-group label { display: flex; align-items: center; gap: 8px; margin: 0; flex: 0 1 auto; white-space: nowrap; }

label { display: block; margin-bottom: 5px; font-weight: bold; }
input[type="text"], input[type="number"], input[type="password"], textarea { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
/* narrow inputs so the row fits; adjust width as needed */
.form-group input[type="text"] { width: 140px; max-width: 140px; min-width: 0; flex: 0 1 140px; }

.button-group { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.btn { padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: bold; text-decoration: none; text-align: center; display: inline-block; box-sizing: border-box; white-space: nowrap; }
.btn-submit { background-color: #007BFF; color: white; }
.btn-submit:hover { background-color: #0056b3; }
.btn-yellow { background-color: #ffc107; color: #212529; border: 1px solid #ffeeba; }
.btn-yellow:hover { background-color: #e0a800; }
.btn-green { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.btn-green:hover { background-color: #c3e6cb; }
.btn-red { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.btn-red:hover { background-color: #f5c6cb; }

.notice { color: #721c24; }