/* Shared site controls: theme toggle, footer links, and information dialogs. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;border:1px solid var(--border);border-radius:9px;background:transparent;color:var(--blue-dark);padding:7px 10px;font:inherit;font-size:12px;line-height:1;cursor:pointer;transition:background .2s,border-color .2s,color .2s}.theme-toggle:hover{background:var(--surface);border-color:var(--blue)}.theme-toggle:focus-visible,.footer-action:focus-visible,.site-modal-close:focus-visible{outline:3px solid var(--blue);outline-offset:3px}.theme-toggle-icon{display:inline-grid;place-items:center;width:16px;height:16px;flex:0 0 16px;line-height:0}.theme-mode-icon{display:block;width:100%;height:100%;overflow:visible;fill:none;stroke:currentColor;stroke-width:2.35;stroke-linecap:round;stroke-linejoin:round}.theme-toggle--floating{position:fixed;z-index:20;top:18px;right:18px;background:var(--surface);box-shadow:0 6px 20px rgba(41,53,61,.08)}.site-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:48px;padding-top:18px;border-top:1px solid var(--border);color:var(--muted);font-size:11px}.footer-links{display:inline-flex;align-items:center;gap:12px}.footer-action{border:0;padding:0;background:transparent;color:var(--blue-dark);font:inherit;font-size:inherit;cursor:pointer}.footer-action:hover{text-decoration:underline}.site-modal{display:none;position:fixed;z-index:100;inset:0;align-items:center;justify-content:center;padding:20px;background:rgba(20,31,38,.55)}.site-modal.is-open{display:flex}.site-modal-card{width:min(100%,560px);max-height:calc(100vh - 40px);overflow:auto;padding:28px;border:1px solid var(--border);border-radius:18px;background:var(--surface);color:var(--text);box-shadow:0 18px 50px rgba(15,25,31,.28)}.site-modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.site-modal-title{margin:0;font-size:20px}.site-modal-close{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:var(--soft,#e9eef0);color:var(--blue-dark);font:inherit;font-size:20px;cursor:pointer}.site-modal-body{color:var(--muted);font-size:14px;line-height:1.9}.site-modal-body p{margin:0}.site-modal-body a{color:var(--blue-dark);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.logout-button{border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}.logout-button:hover{text-decoration:underline;color:var(--blue-dark)}.like-button{display:inline-flex;align-items:center;gap:5px;border:0;border-radius:8px;background:transparent;color:var(--muted);padding:5px 7px;font:inherit;font-size:12px;line-height:1;cursor:pointer;transition:color .18s,background .18s,transform .18s}.like-button:hover:not(:disabled){background:var(--soft,#e9eef0);color:#b86e70}.like-button.is-liked{color:#b86e70}.like-button:disabled{cursor:wait;opacity:.65}.like-button.like-pop{animation:aviports-like-pop .32s ease}.like-button:focus-visible,.logout-button:focus-visible{outline:3px solid var(--blue);outline-offset:3px}@keyframes aviports-like-pop{50%{transform:scale(1.16)}100%{transform:scale(1)}}
.message-button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;border:1px solid var(--border);border-radius:9px;background:transparent;color:var(--blue-dark);padding:7px 10px;font:inherit;font-size:12px;cursor:pointer}.message-button:hover{border-color:var(--blue);background:var(--surface)}.message-button[hidden]{display:none}.message-badge{position:absolute;top:-7px;right:-7px;min-width:18px;height:18px;border:2px solid var(--surface);border-radius:999px;background:#b64e45;color:#fff;padding:0 4px;font-size:9px;line-height:14px;text-align:center}.message-modal-card{width:min(100%,620px)}.message-list{display:grid;gap:8px;max-height:62vh;overflow:auto}.message-item{display:grid;gap:5px;padding:13px 14px;border:1px solid var(--border);border-radius:12px;background:transparent;color:inherit;text-decoration:none}.message-item.is-unread{border-color:var(--blue);background:color-mix(in srgb,var(--soft) 65%,transparent)}.message-item strong{font-size:13px;line-height:1.55}.message-item p{margin:0;color:#b64e45;font-size:12px}.message-item time{color:var(--muted);font-size:10px}.message-kind{color:var(--blue-dark);font-size:10px;font-weight:700}.message-empty{margin:0;padding:35px 12px;color:var(--muted);font-size:13px;text-align:center}
.report-modal-card{width:min(100%,600px)}.report-form{display:grid;gap:14px}.report-form label{display:grid;gap:7px;color:var(--text);font-size:12px;font-weight:700}.report-form input,.report-form select,.report-form textarea{width:100%;border:1px solid var(--border);border-radius:10px;background:var(--white);color:var(--text);padding:10px 11px;font:inherit;font-size:13px}.report-form textarea{min-height:90px;resize:vertical}.report-form small{color:var(--muted);font-size:10px;font-weight:400}.report-message{min-height:18px;margin:0;color:var(--blue-dark);font-size:12px}.report-message.is-error{color:#b64e45}.report-submit{min-height:40px;border:0;border-radius:10px;background:var(--blue);color:#fff;padding:0 17px;font:inherit;font-size:13px;cursor:pointer}.report-submit:disabled{opacity:.6;cursor:wait}
.brand-logo{display:block;width:32px;height:32px;flex:0 0 32px;object-fit:contain}.login-brand-logo{margin-bottom:24px}
.user-title{display:inline-flex;align-items:center;align-self:baseline;justify-content:center;margin-left:4px;padding:1.6px 4.8px;transform:translateY(-.04em);border:1px solid transparent;border-radius:999px;font-size:8px;font-weight:750;line-height:1.15;letter-spacing:0;vertical-align:baseline;white-space:nowrap}
.user-title--carbonox{border-color:#c89b32;background:linear-gradient(135deg,#fff8d8,#ead08a);color:#76540c}
.user-title--administrator{border-color:#cfd5d9;background:linear-gradient(135deg,#fff,#f0f3f5);color:#3d4a53;box-shadow:inset 0 1px rgba(255,255,255,.95)}
.user-title--pilot{border-color:#6fa2cd;background:linear-gradient(135deg,#eaf5ff,#bcdcf4);color:#245f91}
.user-title--ground-crew{border-color:#9aa2a8;background:linear-gradient(135deg,#f1f3f4,#d9dde0);color:#505b63}
.user-title--maintenance{border-color:#9c83c8;background:linear-gradient(135deg,#f5efff,#d8c7f2);color:#624590}
.user-title--controller{border-color:#76a98a;background:linear-gradient(135deg,#ecf8f0,#c5e5d1);color:#316a49}
.user-title--aviation-creator{border-color:#a9b2ba;background:linear-gradient(135deg,#fff 0%,#dfe4e8 48%,#bfc7ce 100%);color:#3f4d58;box-shadow:inset 0 1px rgba(255,255,255,.85)}
.user-title--industry{border-color:#cf8cad;background:linear-gradient(135deg,#fff0f7,#efbfd5);color:#96466d}
.user-title--photographer{border-color:#dc965c;background:linear-gradient(135deg,#fff3e7,#f5c394);color:#9b4e12}
html[data-theme="dark"] .user-title--carbonox{border-color:#d4af54;background:#5a4720;color:#ffe5a0}
html[data-theme="dark"] .user-title--administrator{border-color:#d8e0e5;background:#f5f7f8;color:#26343d;box-shadow:none}
html[data-theme="dark"] .user-title--pilot{border-color:#527fa4;background:#203e55;color:#b9ddfa}
html[data-theme="dark"] .user-title--ground-crew{border-color:#6d7880;background:#323b41;color:#d9e0e4}
html[data-theme="dark"] .user-title--maintenance{border-color:#8164ae;background:#392b50;color:#decdf8}
html[data-theme="dark"] .user-title--controller{border-color:#56866a;background:#213f2e;color:#bce8cb}
html[data-theme="dark"] .user-title--aviation-creator{border-color:#8e9aa3;background:linear-gradient(135deg,#4b565e,#242d33);color:#eef3f6}
html[data-theme="dark"] .user-title--industry{border-color:#a86787;background:#4f293b;color:#f4c3da}
html[data-theme="dark"] .user-title--photographer{border-color:#ad7040;background:#4c301d;color:#ffd1aa}

html[data-theme="dark"]{color-scheme:dark;--bg:#10181e;--white:#1a252c;--surface:#18242b;--blue:#7898ab;--blue-dark:#c0d5e0;--text:#edf4f7;--muted:#a8bbc5;--border:#344852;--soft:#263841}html[data-theme="dark"] .theme-toggle{background:#1a2730}html[data-theme="dark"] .theme-toggle:hover{background:#24343e}html[data-theme="dark"] .main-card:not(.sim),html[data-theme="dark"] .toolbar,html[data-theme="dark"] .update:hover,html[data-theme="dark"] .tool:hover,html[data-theme="dark"] .card:hover,html[data-theme="dark"] .post:hover,html[data-theme="dark"] .login:hover,html[data-theme="dark"] .nav-link:hover,html[data-theme="dark"] .ghost:hover{background:#1d2b33}html[data-theme="dark"] .photo{background:linear-gradient(150deg,#273b41 0%,#18242b 64%)}html[data-theme="dark"] .photo:nth-child(2){background:linear-gradient(150deg,#423830 0%,#18242b 64%)}html[data-theme="dark"] .photo:nth-child(3){background:linear-gradient(150deg,#253b46 0%,#18242b 64%)}html[data-theme="dark"] .main-card::after{color:#2a3b43}html[data-theme="dark"] .icon,html[data-theme="dark"] .card-icon,html[data-theme="dark"] .date,html[data-theme="dark"] .toolbar-title span{background:#263841}html[data-theme="dark"] .tabs{background:#26343a}html[data-theme="dark"] .tab.active,html[data-theme="dark"] input,html[data-theme="dark"] .field input,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .field select,html[data-theme="dark"] .reply-form input,html[data-theme="dark"] .code-btn{background:#152128;color:var(--text)}html[data-theme="dark"] .message,html[data-theme="dark"] .notice{background:#243942;color:var(--blue-dark)}html[data-theme="dark"] .message.error{background:#442f2c;color:#f0beb1}html[data-theme="dark"] .modal{background:rgba(8,14,18,.7)}html[data-theme="dark"] .modal-box{background:var(--surface);box-shadow:0 12px 40px rgba(0,0,0,.35)}html[data-theme="dark"] .site-modal{background:rgba(5,10,13,.7)}html[data-theme="dark"] .site-modal-card{box-shadow:0 18px 50px rgba(0,0,0,.45)}html[data-theme="dark"] .arrow,html[data-theme="dark"] .go{color:#8fa7b5}html[data-theme="dark"] ::selection{background:#456474;color:#fff}@media(max-width:480px){.theme-toggle{padding:7px 8px}.theme-toggle-label{display:none}.theme-toggle--floating{top:14px;right:14px}.footer-links{gap:14px}.site-modal-card{padding:23px 20px}}

.site-search-form{display:flex;align-items:center;overflow:hidden;min-width:170px;height:34px;border:1px solid var(--border,#e5e1da);border-radius:9px;background:var(--surface,#fbfaf7)}
.site-search-form input{min-width:0;width:112px;height:100%;border:0!important;outline:0!important;background:transparent!important;color:var(--text,#29353d);padding:0 9px!important;font:inherit;font-size:11px!important;box-shadow:none!important}
.site-search-form button,.site-search-dialog-form button{height:100%;border:0;background:var(--blue,#647d91);color:#fff;padding:0 10px;font:inherit;font-size:11px;cursor:pointer}
.site-search-modal{display:none;position:fixed;z-index:250;inset:0;align-items:center;justify-content:center;padding:20px;background:rgba(20,31,38,.58)}
.site-search-modal.is-open{display:flex}
.site-search-card{width:min(100%,680px);max-height:calc(100vh - 40px);overflow:auto;padding:24px;border:1px solid var(--border,#e5e1da);border-radius:18px;background:var(--surface,#fbfaf7);color:var(--text,#29353d);box-shadow:0 18px 50px rgba(15,25,31,.28)}
.site-search-header{display:flex;align-items:center;justify-content:space-between;gap:14px}.site-search-header h2{margin:0;font-size:20px}
.site-search-close{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:var(--soft,#e9eef0);color:var(--blue-dark,#40586b);font:inherit;font-size:20px;cursor:pointer}
.site-search-dialog-form{display:grid;grid-template-columns:minmax(0,1fr) auto;height:43px;margin-top:18px;overflow:hidden;border:1px solid var(--border,#e5e1da);border-radius:10px}
.site-search-dialog-form input{min-width:0;border:0!important;outline:0!important;background:var(--white,#fff)!important;color:var(--text,#29353d);padding:0 13px!important;font:inherit;font-size:13px!important;box-shadow:none!important}
.site-search-dialog-form button{padding:0 16px;font-size:12px}

/* Keep the native control dimensions while giving every select arrow balanced right spacing. */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%236b7a82' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 10px 6px !important;
}

html[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23a8bbc5' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* Use an actual symmetric SVG so close icons do not depend on font baselines. */
:is(.close, .modal-close, .policy-close, .profile-modal-close, .site-modal-close, .site-search-close, .community-guidelines-close, #clearSearch) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

:is(.close, .modal-close, .policy-close, .profile-modal-close, .site-modal-close, .site-search-close, .community-guidelines-close, #clearSearch)::before {
  content: none;
}

.aviports-close-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 3l8 8m0-8-8 8' fill='none' stroke='%236b7a82' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  cursor: pointer;
}
.site-search-tabs{display:flex;gap:7px;margin:16px 0 11px}.site-search-tabs button{border:1px solid var(--border,#e5e1da);border-radius:999px;background:transparent;color:var(--muted,#7b858b);padding:7px 13px;font:inherit;font-size:12px;cursor:pointer}.site-search-tabs button.is-active{border-color:var(--blue,#647d91);background:var(--blue,#647d91);color:#fff}
.site-search-results{display:grid;gap:8px;max-height:52vh;overflow:auto}
.site-search-result{display:grid;gap:5px;padding:12px 13px;border:1px solid var(--border,#e5e1da);border-radius:11px;background:color-mix(in srgb,var(--soft,#e9eef0) 38%,transparent);color:inherit;text-decoration:none}.site-search-result:hover{border-color:var(--blue,#647d91)}.site-search-result>strong{font-size:13px}.site-search-result p{overflow:hidden;margin:0;color:var(--muted,#7b858b);font-size:11px;line-height:1.55;text-overflow:ellipsis;white-space:nowrap}.site-search-result>small{color:var(--muted,#7b858b);font-size:10px}
.site-search-result-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.site-search-result-meta b{color:var(--blue-dark,#40586b);font-size:10px}.site-search-result-meta small{color:var(--muted,#7b858b);font-size:10px}
.site-search-user-result{grid-template-columns:42px minmax(0,1fr);align-items:center}.site-search-user-result>span:last-child{display:grid;gap:4px}.site-search-user-result small{color:var(--muted,#7b858b);font-size:11px}
.site-search-avatar{display:grid;place-items:center;width:42px;height:42px;overflow:hidden;border-radius:12px;background:var(--soft,#e9eef0);color:var(--blue-dark,#40586b);font-size:14px;font-weight:700}.site-search-avatar img{width:100%;height:100%;object-fit:cover}
.site-search-empty{margin:0;padding:30px 12px;color:var(--muted,#7b858b);font-size:12px;text-align:center}
html[data-theme="dark"] .site-search-card{background:var(--surface,#18242b);box-shadow:0 18px 50px rgba(0,0,0,.45)}
@media(max-width:760px){.site-search-form{min-width:34px;width:34px}.site-search-form input{display:none}.site-search-form button{width:100%;padding:0;font-size:0}.site-search-form button::before{content:'⌕';font-size:18px}.site-search-card{padding:20px 16px}}

/* Home-page search and shared pagination. */
.nav:has(.site-search-form){flex-wrap:nowrap}
.nav:has(.site-search-form) .brand,.nav:has(.site-search-form) .nav-right{flex:0 0 auto}
.site-search-form{flex:1 1 50%;min-width:340px;max-width:440px;width:50%;height:42px;padding:3px;overflow:hidden;border-radius:12px}
.site-search-form input{display:block;flex:1;min-width:0;width:auto;padding:0 11px!important;font-size:12px!important}
.site-search-form button{width:auto;height:34px;flex:0 0 auto;border-radius:9px;padding:0 16px;font-size:12px}
.site-search-form button::before{content:none}
.site-pagination{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin:22px auto 4px;text-align:center}
.site-pagination button{min-width:32px;height:32px;border:1px solid var(--border,#e5e1da);border-radius:9px;background:var(--surface,#fbfaf7);color:var(--blue-dark,#40586b);padding:0 9px;font:inherit;font-size:11px;cursor:pointer}
.site-pagination button:hover:not(:disabled){border-color:var(--blue,#647d91);background:var(--soft,#e9eef0)}
.site-pagination button:disabled{cursor:default;opacity:.42}
.site-pagination button.is-current{border-color:var(--blue,#647d91);background:var(--blue,#647d91);color:#fff;font-size:14px;font-weight:800}
.site-pagination .site-page-ellipsis{color:var(--muted,#7b858b);font-size:12px}
@media(max-width:640px){.nav:has(.site-search-form){gap:7px}.nav:has(.site-search-form) .brand-cn,.nav:has(.site-search-form) .theme-toggle-label{display:none}.site-search-form{order:initial;flex:1 1 auto;min-width:90px;max-width:none;width:auto}.site-search-form button{padding:0 8px}.site-pagination{gap:4px}.site-pagination button{min-width:29px;padding:0 7px}}

.like-button .like-icon{display:block;width:14px;height:14px;fill:transparent;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:fill .18s,color .18s}
.like-button.is-liked .like-icon{fill:currentColor}
