/* m.css (refactored, updated with rounded prefix input) */

/* ---- Reset-ish ---- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Nanum Gothic', sans-serif;
  color: #333;
  background: #f3f3f3;
  margin: 0;
}

/* ---- Layout ---- */
header {
  background: #003366;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}
header a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: bold;
}
header a:hover { text-decoration: underline; }
footer {
  background: #003366;
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: .8rem;
}

.top-half {
  background: #003366;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100px;
  padding: 2rem 1rem;
}
.shorten-title { font-size: 1.8rem; margin-bottom: 1rem; }
.bottom-half { background: #fff; color: #333; min-height: 50vh; padding: 1rem; overflow-x: auto; }

/* ---- Utilities ---- */
.inline { display: inline; }
.block { margin: 16px 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.t-center { text-align: center; }
.hint-center { text-align: center; margin-top: 1rem; font-size: .95rem; color: #555; }
.notice-inline { display: block; margin: 1rem auto; }

/* ---- Forms ---- */
.no-bg-form {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.no-bg-form .input-group {
  background: transparent;
  width: 100%;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.no-bg-form input[type="text"],
.no-bg-form input[type="password"] {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  outline: none;
  border-radius: 0;
  background: #f5f5f5;
}
.no-bg-form input[type="text"] { background: #fff; }
.no-bg-form button {
  background: #212121;
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background .3s;
  border-radius: 8px;
}
.no-bg-form button:hover { background: #000; }

.options-group { display: flex; width: 100%; gap: 10px; flex-wrap: wrap; }
.options-group input {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.prefix-input {
  border: 1px solid #ccc !important;
  border-radius: 8px; !important; /* µ¿ÀÏÇÑ ¶ó¿îµå ¸ð¼­¸® Àû¿ë */
  padding: 1rem;
  font-size: 1rem;
  text-align: center;
  width: 60px;
  background: #fff;
}

.vote-option { display: flex; align-items: center; margin: 6px 0; gap: 8px; padding-left: 12px; }
.vote-option input[type="radio"] { flex-shrink: 0; }
.vote-option span { font-size: 1.8rem; font-weight: 700; }

/* ---- Buttons ---- */
.delete-btn,
.btn-delete, .btn-reopen, .btn-close, .btn-manage, .btn-result,
.btn-vote, .btn-export {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .3s;
}
.delete-btn { background: #2f4f7a; padding: 12px 24px; }
.delete-btn:hover { background: #244169; }
.btn-delete { background: #c00; padding: 10px 20px; }
.btn-delete:hover { background: #a00; }
.btn-reopen { background: #2f4f7a; padding: 10px 20px; }
.btn-reopen:hover { background: #244169; }
.btn-close { background: #666; padding: 10px 20px; }
.btn-close:hover { background: #444; }
.btn-manage { background: #ff9800; padding: 10px 20px; }
.btn-manage:hover { background: #e68900; }
.btn-result { background: #28a745; padding: 10px 20px; }
.btn-result:hover { background: #218838; }
/*.btn-vote { background: #ff5722; padding: 12px 24px; }
.btn-vote:hover { background: #e64a19; }*/
.btn-export { background: #1976d2; padding: 10px 18px; font-weight: 600; font-size: .95rem; }
.btn-export:hover { background: #155fa8; }

.btn-vote {
  background-color: #007bff; /* ÆÄ¶û ÃßÃµ */
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;   /* ±ÛÀÚ Å©±â Å°¿ò */
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.btn-vote:hover {
  background-color: #0056b3; /* hover ½Ã ÁøÇÑ ÆÄ¶û */
}
.candidate-list {
  margin-top: 2rem; /* ¹öÆ°°ú ÈÄº¸ »çÀÌ °£°Ý */
}
.vote-option {
  display: block;
  margin: 0.4rem 0;
}






/* ---- Modal ---- */
.notice-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; justify-content: center; align-items: center; }
.notice-content { background: #fff; padding: 2rem; border-radius: 12px; max-width: 400px; width: 80%; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,.3); color: #333; }
.notice-title { margin-bottom: 8px; font-weight: bold; }
.notice-content button { margin-top: 1rem; padding: 10px 20px; background: #003366; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.notice-content button:hover { background: #001f4d; }

/* ---- Table ---- */
table.type08 {
  border-collapse: collapse;
  text-align: left;
  line-height: 1.5;
  border-left: 1px solid #ccc;
  margin: 20px 10px;
  width: 100%;
  table-layout: fixed;
  border-radius: 8px;
  overflow: hidden;
}
table.type08 thead th {
  padding: 10px;
  font-weight: bold;
  border-top: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-bottom: 2px solid #c00;
  background: #2f4f7a;
  color: #fff;
  vertical-align: middle;
  text-align: center;
}
table.type08 td {
  padding: 10px;
  vertical-align: middle;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* align helpers */
table.type08 tbody td:nth-child(1),
table.type08 tbody td:nth-child(2),
table.type08 tbody td:nth-child(5),
table.type08 tbody td:nth-child(6),
table.type08 thead th:nth-child(1),
table.type08 thead th:nth-child(2),
table.type08 thead th:nth-child(5),
table.type08 thead th:nth-child(6) { text-align: center; vertical-align: middle; }
/* first column (checkbox etc.) */
table.type08 td:first-child,
table.type08 thead th:first-child { text-align: center; vertical-align: middle; }
table.type08 th:first-child input[type="checkbox"],
table.type08 td:first-child input[type="checkbox"] { margin: 0; vertical-align: middle; }
/* inputs in table */
table.type08 input[type="number"],
table.type08 input[type="text"] {
  padding: 4px 6px;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-family: 'Nanum Gothic', sans-serif;
  text-align: center;
  background: transparent;
  width: 100%;
}
/* remove number spinners */
table.type08 input[type="number"]::-webkit-outer-spin-button,
table.type08 input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table.type08 input[type="number"] { -moz-appearance: textfield; }

/* ---- Misc ---- */
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.admin-hint { text-align: center; margin: 1rem auto; font-size: .95rem; color: #fff; background: #c00; padding: 10px 16px; border-radius: 8px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; margin-top: .5rem; display: flex; justify-content: flex-end; flex-wrap: wrap; }
  .no-bg-form .input-group { flex-direction: column; }
  .no-bg-form button { width: 100%; margin-top: 5px; border-radius: 8px; }
  .options-group input { width: 100%; }
}

/* === PATCH 2025-09-17: prefix input rounded & force override === */
.options-group .prefix-input {
  /* Ä³½Ã/¿ì¼±¼øÀ§ ÀÌ½´ ¹æÁö¿ë: °­ÇÑ ¼±ÅÃÀÚ + !important */
  border-radius: 8px !important;
  border: 1px solid #ccc !important;
  background: #fff;
  padding: 1rem;
  font-size: 1rem;
  width: 60px;
  text-align: center;

  /* ºê¶ó¿ìÀú ±âº» ¸ð¾ç ÃÊ±âÈ­ (»çÆÄ¸® µî) */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

/* È¤½Ã ºÎ¸ð°¡ µÕ±Ù ¸ð¼­¸®¸¦ °¡¸®´Â °æ¿ì¸¦ ´ëºñ (¾ÈÀü) */
.options-group { overflow: visible; }


/* === PATCH: ÅõÇ¥ ¿©ºÎ Á¡ Ç¥½Ã, ÄÚµå ÆùÆ® === */

.vote-dot { display:inline-block; width:12px; height:12px; border-radius:999px; vertical-align:middle; }
.vote-dot.ok { background:#28a745; }      /* ÅõÇ¥ÇÔ(ÃÊ·Ï) */
.vote-dot.no { background:#f3c3c3; }      /* ¹ÌÅõÇ¥(¿¶Àº ºÓÀº) */

.vcode {
  font-family: 'JetBrains Mono','Fira Mono','SFMono-Regular','Consolas','Menlo','Roboto Mono',ui-monospace,monospace;
  letter-spacing: .02em;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1rem;
}


/* ÄÚµå(¿µ¼ýÀÚ) °¡µ¶¼º ÁÁÀº ÆùÆ® */
.vcode {
  font-family: 'JetBrains Mono', 'Fira Mono', 'SFMono-Regular', 'Consolas', 'Menlo', 'Roboto Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1rem;
}

/* °á°úº¸±â Åø¹Ù */
.results-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
