/* ==========================================================================
   Global & Base Styles (จาก style.css เดิม)
   ========================================================================== */
body {
  font-family: "Sarabun", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #fffde7;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.head-container {
  background: linear-gradient(to right, rgb(151, 143, 96), rgb(167, 144, 16));
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 800px;
}

.main-container {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 800px;
}

.sub-container {
  margin-top: 20px !important;
  position: relative !important;
}

.text-center {
  text-align: center;
}

h1 {
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
}

h2{
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.0em;
}

h3 {
  color: #333;
  margin-top: 0;
}

.header-divider {
    width: 85%;
    height: 3px;
    background-color: #dc3545;
    margin: -15px auto 30px auto;
    border-radius: 2px;
}

mark {
    background-color: yellow;
    font-weight: bold;
}

/* ==========================================================================
   Navbar Styles (จาก navbar.css)
   ========================================================================== */
.navbar {
    background-color: rgb(167, 144, 16);
    color: white;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    margin: 0;
    box-sizing: border-box;
    z-index: 10;
    margin-bottom: 50px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.navbar-brand img.logo-img {
    height: 60px;
    display: block;
}

.navbar-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.navbar-menu {
    display: flex;
    list-style: none;
    padding-left: 0;
    margin: 0;
    gap: 16px;
}

.navbar-menu li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s;
}

.navbar-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-menu li a.active {
    background-color: white;
    color: #000;
}

.navbar-menu2 {
    display: none;
    list-style: none;
    padding-left: 0;
    margin: 0;
    gap: 16px;
    width: fit-content;
}

.navbar-menu2 li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s;
}

.login-button {
    background-color: white;
    color: #000;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #e0e0e0;
}

.token-container-mobile {
    display: none;
    background-color: #ac9012;
    gap: 12px;
}

.token-box-mobile {
    display: flex;
    align-items: center;
    background-color: #333;
    padding: 6px 10px;
    border-radius: 10px;
    color: white;
    gap: 12px;
    width: fit-content;
}

.token-container {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    background-color: #ac9012;
    padding: 10px;
    gap: 12px;
}

.token-box {
    display: flex;
    align-items: center;
    background-color: #333;
    padding: 6px 10px;
    border-radius: 10px;
    color: white;
    gap: 12px;
}

.token {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token img {
    width: 20px;
    height: 20px;
}

.btn-add-coin {
    background-color: #2ecc71;
    border: none;
    border-radius: 10px;
    width: 80px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
    font-size: 14px;
    text-decoration: none;
    font-family: inherit;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown.hide-content, .hide-content {
    display: none;
}

.dropdown-toggle {
    background-color: white;
    color: black;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    z-index: 1;
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    padding: 10px;
    color: black;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* ==========================================================================
   Page Content Styles (รวมจาก index.css และ main.css)
   ========================================================================== */

/* --- Logo & General Headers --- */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 180px;
    width: 50%;
    height: auto;
}

/* --- Messages (Error, Info) --- */
.error-message {
    color: red;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid red;
    background-color: #ffebeb;
}

.info-message {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

.no-results-message {
    color: #555;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

/* --- Search Form (รวมจาก 2 ไฟล์) --- */
.search-form {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fffde7;
}

.search-form-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
}

.search-form label[for="query"] {
    font-weight: bold;
    white-space: nowrap;
}

.search-form input[type="text"] {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fffde7;
}

.search-form textarea {
    padding: 10px;
    font-size: 1em;
    line-height: 1.2;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fffde7;
    resize: vertical;
}

.search-form .input-wrapper {
    display: flex;
    flex-direction: column;
}

.search-options {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-options label {
    margin-right: 5px;
    font-size: 0.95em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.search-options input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

.search-form button {
    padding: 10px 20px;
    font-size: 1.05em;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.search-form button:hover {
    background-color: #c82333;
}

/* --- Index Page: Button Row --- */
.button-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.button-row a {
    flex: 1;
    text-align: center;
    background-color: white;
    border-radius: 12px;
    padding: 10px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: black;
    display: inline-block;
}

.button-row a:hover {
    background-color: #f0f0f0;
}

.button-row a.active {
    background-color: #f0c420;
    font-weight: bold;
    color: #000;
}

/* --- Index Page: Results Area --- */
.results-area {
    padding-top: 15px;
}

.results-area h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
}

.sub-head {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: rgb(250, 100, 113);
    font-weight: bold;
}

@media (min-width: 768px) {
    .judgment-item {
        /* เพิ่ม transition เพื่อให้สีพื้นหลังเปลี่ยนอย่างนุ่มนวล */
        transition: background-color 0.3s ease;
    }

    .judgment-item:hover {
        /* [คืนค่า] สีพื้นหลังสีเหลืองอ่อนตอน hover */
        background-color: rgb(255, 251, 204);
    }

    .judgment-item .summary {
        /* การเปลี่ยนแปลงความสูงที่นุ่มนวล */
        transition: max-height 0.4s ease-in-out;
    }

    .judgment-item:hover .summary,
    .judgment-item .summary.expanded {
        /* ขยายความสูงออกเมื่อ hover หรือมี class .expanded */
        max-height: 1000px; /* ค่าที่สูงพอให้แสดงเนื้อหาทั้งหมด */
    }
}

.judgment-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #000;
    position: relative;
    padding-right: 150px;
    min-height: 60px;
}

.judgment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.judgment-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.judgment-item h3 a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    flex-grow: 1;
}

.judgment-item h3 a:hover {
    text-decoration: underline;
}

.judgment-item .summary {
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.judgment-item .info-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.judgment-item .info-tag {
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 3px;
    line-height: 1.4;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

.judgment-item .info-tag strong {
    font-weight: bold;
    color: #333;
}

.judgment-item .show-more-hint {
    display: block;
    margin-top: 3px;
    font-size: 0.9em;
    color: #007bff;
    cursor: help;
    text-decoration: underline dotted;
}

/* --- Main Page: Content Sections --- */
.section {
  margin-bottom: 20px;
  border-bottom: 1px solid #000;
  padding-bottom: 15px;
}

.section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section h1, .section h3 {
  margin-top: 0;
  margin-bottom: 0;
  padding: 8px 12px;
  background-color: #f0e68c;
  color: #333;
  border: 1px solid #d2b74c;
  border-radius: 4px;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.section-content {
  padding: 0 10px;
  font-size: 15px;
}

.section-content h2 {
  margin: 0;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
  padding-top: 15px;
  padding-bottom: 5px;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-row .fa-circle-info {
  font-size: 1em;
}

.source-in-summary-content {
  font-size: 0.8em;
  color: #555;
  white-space: nowrap;
  margin-top: 15px;
  display: block;
  float: right;
  padding: 0 10px;
}

.pre-paragraph {
  text-indent: 5em;
  margin-top: 10px;
}

.related-list {
  margin: 5px 0 10px 0px;
  padding: 0;
  list-style-type: none;
}

.related-list li a {
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
}

.related-list li a:hover {
  text-decoration: underline;
}

.link-icon {
  vertical-align: middle;
  margin-right: 8px;
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
}

.section-tag {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-tag {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.btn-tag:hover {
  background-color: #e0e0e0;
  border-color: #999;
  color: #000;
}

/* --- Buttons & Controls --- */
.version-switcher {
  text-align: center;
  margin-bottom: 20px;
}

.version-switcher span {
  margin-right: 5px;
  font-weight: bold;
}

.version-switcher a {
  display: inline-block;
  padding: 5px 10px;
  font-size: 0.9em;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  margin: 0 2px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.version-switcher a:hover {
  background-color: #e0e0e0;
  color: #000;
}

.version-switcher a.active {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
  font-weight: bold;
  pointer-events: none;
}

.font-size-buttons {
  background-color: #f0f0f0;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  gap: 0;
  border: 1px solid #ccc;
}

.font-size-buttons button {
  border: none;
  background-color: transparent;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, border 0.2s;
  outline: none;
  border-radius: 4px;
}

.font-size-buttons button.selected {
  background-color: #29b6f6;
  color: white;
  border: 2px solid #0277bd;
}

.button-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.toggle-button {
  padding: 6px 12px;
  background-color: #29b6f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

.toggle-button:hover {
  background-color: #0288d1;
}

.print-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.print-button:hover {
  background-color: #0056b3;
}

.pin-button {
  width: 100%;
  padding: 12px;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.88em;
  cursor: pointer;
  text-align: center;
}
/* main.css has a float:right version, but this seems more robust for both pages */

/* --- Pagination --- */
.pagination-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: sans-serif;
    margin-top: 40px;
    margin-bottom: 15px;
}

.page-input {
    width: 50px;
    text-align: center;
    padding: 4px;
    font-size: 16px;
    border: 2px solid #002855;
    border-radius: 8px;
}

.page-of {
    font-size: 16px;
}

.page-btn {
    padding: 6px 10px;
    border: 1px solid #002855;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    color: black;
}

/* --- Modals, Tooltips, Loaders (รวมจาก 2 ไฟล์) --- */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  overflow: auto;
}

.custom-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 750px;
  border-radius: 8px;
  font-family: "Sarabun", sans-serif;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.custom-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.custom-close:hover,
.custom-close:focus {
    color: red;
    text-decoration: none;
}

.custom-textarea {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  box-sizing: border-box;
  font-family: "Sarabun", sans-serif;
  margin-bottom: 15px;
  min-height: 100px;
}

.custom-modal-actions {
  text-align: right;
}

.custom-modal-actions button {
  padding: 6px 12px;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.88em;
  cursor: pointer;
  text-align: center;
  background-color: #007bff;
}

.modal-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.form-group-inline label {
    font-weight: bold;
    white-space: nowrap;
}

.form-group-inline select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    flex-grow: 1;
}

.search-button {
    padding: 8px 15px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: #0056b3;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 230px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-box {
    position: relative;
    width: 100px;
    height: 100px;
}

.hammer {
    width: 60px;
    height: 60px;
    background-image: url('../img/logo/logo_hammer.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.spinner {
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: gold;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    animation: spin 1s linear infinite;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Print Styles --- */
.print-only-head {
  display: none;
  text-align: center;
}

/* ==========================================================================
   Footer Styles (จาก footer.css)
   ========================================================================== */
.main-footer {
    margin-top: auto; /* [เพิ่มบรรทัดนี้] ดัน footer ไปล่างสุด */
    background-color: rgb(167, 144, 16);
    color: #000;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 25px 20px;
    border-top: 1px solid #8a7300;
    font-size: 16px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #000;
    font-weight: bold;
    text-decoration: none;
    margin: 0 10px;
    transition: text-decoration 0.2s;
}

.footer-links a:hover {
    text-decoration: underline;
}

.developer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #000;
    flex-wrap: wrap;
}

.developer-info img {
    height: 30px;
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   Responsive & Media Queries
   ========================================================================== */
.font-desktop {
  display: block;
}

.font-mobile {
  display: none;
}

@media (max-width: 1100px) {
    /* --- Navbar Responsive --- */
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .navbar-menu.show {
        display: flex;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu2 {
        display: block;
    }

    .token-container-mobile {
        display: flex;
    }

    .token-box {
        display: none;
    }
}

@media (max-width: 817px) {
    /* --- Index Page Responsive --- */
    .search-form-grid {
        grid-template-columns: 1fr;
    }

    .search-form label[for="query"] {
        margin-bottom: 5px;
    }

    .search-form button {
        width: 100%;
        font-size: 1em;
        padding: 10px;
        justify-self: center;
    }

    .search-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-top: 10px;
    }

    .button-row {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .button-row a {
        width: 100%;
        font-size: 16px;
        padding: 12px 0;
        display: block;
    }
}

@media (max-width: 768px) {
    /* --- General Mobile Styles --- */
    .head-container, .main-container {
        width: 95%;
        padding: 15px;
    }

    .font-desktop {
      display: none;
    }

    .font-mobile {
      display: block;
    }

    .font-size-buttons {
      float: right;
      justify-content: center;
      margin-top: 10px;
      margin-right: 10px;
    }

    .button-group {
      flex-direction: column;
      align-items: stretch;
      padding: 0 10px;
    }

    .print-button {
      width: 100%;
      font-size: 1em;
      padding: 10px;
    }

    .version-switcher {
      flex-wrap: wrap;
      padding: 0 10px;
      font-size: 0.95em;
    }

    .version-switcher a {
      margin-top: 6px;
    }
    
    .section h3 {
      font-size: 1.05em;
      flex-direction: column;
      align-items: flex-start;
      gap: 5px;
    }

    .section-content {
      font-size: 0.95em;
      padding: 0 5px;
    }

    .source-in-summary-content {
      float: none;
      display: block;
      text-align: right;
      padding-right: 5px;
      margin-top: 10px;
    }

    .related-list, .btn-tag {
      padding-left: 10px;
      font-size: 13px;
      padding: 6px 10px;
    }

    /* --- Mobile Results List --- */
     .results-area h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .sub-head {
        font-size: 1em;
        padding: 0 5px;
        word-break: break-word;
    }

    .judgment-item {
        padding: 10px;
        min-height: auto;
    }
    
    .judgment-item:hover {
        background-color: transparent;
    }

    .judgment-item.expanded {
        background-color: rgb(255, 251, 204);
    }

    .judgment-item h3 {
        font-size: 1em;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .judgment-item h3 a { width: 100%; }

    .judgment-item .summary {
        max-height: 100px;
        font-size: 0.9em;
    }

    .judgment-item .summary.expanded {
        max-height: none !important;
    }

    .judgment-item .info-wrapper {
        position: static;
        width: 100%;
        margin-top: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .judgment-item .info-tag {
        text-align: left;
    }
    
    .pin-button {
        font-size: 1em;
        width: 100%;
        text-align: center;
        padding: 10px;
        margin-bottom: 5px;
    }

    /* --- Mobile Modals & Pagination --- */
    .custom-modal-content {
      width: 90%;
      padding: 15px;
      margin-top: 30%;
    }

    .custom-textarea { min-height: 80px; }

    .tooltip .tooltiptext {
      width: 90vw;
      left: 0;
      bottom: 110%;
      font-size: 12px;
    }
    
    .pagination-form {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
	}
}

@media print {
    .navbar, .head-container, button {
        display: none;
    }

    .print-only-head {
        display: block;
    }
    
    body.print-only * { visibility: hidden; }
    body.print-only #print-area,
    body.print-only #print-area * { visibility: visible; }
    body.print-only #print-area {
        position: absolute;
        left: 0;
        top: 0;
    }
}