/* ═══════════════════════════════════════════════════════════════
   Apostil Tekshirish — CSS (asl dizayn bilan bir xil)
═══════════════════════════════════════════════════════════════ */

/* Google Fonts - Raleway */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');

/* Icomoon ikonkalari */
@font-face {
  font-family: icomoon;
  src: url('../fonts/icomoon.c1b089e9.eot');
  src: url('../fonts/icomoon.c1b089e9.eot') format('embedded-opentype'),
       url('../fonts/icomoon.70355110.ttf') format('truetype'),
       url('../fonts/icomoon.c513af89.woff') format('woff'),
       url('../images/icomoon.50e21486.svg') format('svg');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

[class*=" icon-"], [class^=icon-] {
  font-family: icomoon !important;
  speak: never;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-close:before   { content: "\e905"; }
.icon-planet:before  { content: "\e900"; }
.icon-calendar:before{ content: "\e904"; }
.icon-question:before{ content: "\e901"; }
.icon-file:before    { content: "\e902"; }
.icon-warning:before { content: "\e903"; }
.icon-download:before{ content: "\e907"; }
.icon-error:before   { content: "\e906"; }

/* ─── Reset ───────────────────────────────────────────────── */
*, :after, :before {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a, article, aside, body, button, div, footer, form,
h1, h2, h3, h4, h5, h6, header, html, img, label,
li, nav, ol, p, section, span, ul {
  margin: 0; padding: 0; border: 0;
}

h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; line-height: 1.2; }
a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; border: 0; }
button, input, textarea { outline: none; font-family: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }
html { line-height: 1.15; }

/* ─── CSS Variables (asl sayt bilan bir xil) ─────────────── */
:root {
  --c-main: #3ca398;
  --c-main-hover: #01a68a;
  --c-white: #fff;
  --c-black: #313131;
  --c-link: #337ab7;
  --c-grey-bg: #f6f6f6;
  --c-inactive-text: #7b7b7b;
  --c-warning: #f68431;
  --c-error: #ea3737;
  --c-border: #cecece;
  --border: 1px solid var(--c-border);
}

html { font-size: 16px; }

body {
  font-family: Raleway, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: var(--c-grey-bg);
}

/* ─── Layout ──────────────────────────────────────────────── */
#app {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  width: 100%;
}

.container--max-width {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { border: none; background-color: var(--c-main); }

/* ─── Header ──────────────────────────────────────────────── */
.app-header {
  width: 100%;
  background: linear-gradient(180deg, transparent, rgba(49,49,49,0) .01%, rgba(49,49,49,.2)),
              linear-gradient(0deg, #3ca398, #3ca398);
  color: var(--c-white);
}

.app-header .container--max-width {
  display: flex;
  align-items: center;
}

.app-header__logo {
  height: 4.5rem;
  margin-right: 1rem;
}

.app_header__title {
  font-size: 1.375rem;
  line-height: 1.614rem;
  font-weight: 600;
  max-width: 70%;
  margin: 1rem auto 1rem 0;
}

@media screen and (max-width: 660px) {
  .app-header .container--max-width { flex-wrap: wrap; padding-bottom: 10px; }
  .app_header__lang-swr { margin-left: auto; }
}

/* ─── Main ────────────────────────────────────────────────── */
.app-main {
  background-color: var(--c-grey-bg);
}

.app-main__title {
  margin: 2.5rem 0 1.25rem;
  color: var(--c-black);
  font-size: 2rem;
  font-weight: 700;
}

/* ─── Card ────────────────────────────────────────────────── */
.c-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: auto;
  background: var(--c-white);
  box-shadow: 4px 8px 24px 0 rgba(49,49,49,.12);
  border-radius: 16px;
  padding: 1rem;
  transition: all .25s;
  margin-bottom: 1rem;
}

.c-card__header {
  display: flex;
  padding-bottom: 9px;
  color: var(--c-main);
  border-bottom: 1px solid var(--c-main);
  align-items: center;
}

.c-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.468rem;
  margin-right: auto;
}

.c-card__body {
  margin-top: 1.5rem;
  transition: all .25s;
}

/* ─── Search Form (asl grid layout) ──────────────────────── */
.search-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1px 1fr;
  grid-gap: 24px;
  align-items: center;
}

.search-form__separator {
  background-color: var(--c-border);
  height: 100%;
}

.search-form__field--margin-top {
  margin-top: 20px;
}

.search-form__btns {
  display: flex;
  padding: 0 40px 0 0;
}

.search-form__btns .f-button {
  width: 145px;
  margin: 0 5px;
}

@media screen and (max-width: 860px) {
  .search-form { grid-template-columns: 1fr 1fr; grid-gap: 14px; }
  .search-form__dummy-field, .search-form__separator { display: none; }
}

@media screen and (max-width: 730px) {
  .search-form { grid-template-columns: 1fr; grid-gap: 0; justify-content: center; }
  .search-form__dummy-field, .search-form__separator { display: none; }
  .search-form__btns { padding: 0; width: 100%; margin: 1rem 0; }
}

/* ─── Field ───────────────────────────────────────────────── */
.field-wrapp {
  position: relative;
  margin-bottom: 20px;
}

.field-wrapp__label {
  font-size: 14px;
  line-height: 16.44px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--c-black);
  text-align: left;
}

.field-wrapp__error {
  font-size: 12px;
  color: var(--c-error);
  margin-top: 4px;
}

/* ─── Input ───────────────────────────────────────────────── */
.f-input {
  border: var(--border);
  font-size: 16px;
  line-height: 18.8px;
  padding: 12px;
  width: 100%;
  border-radius: 4px;
  color: var(--c-black);
  transition: border-color .25s;
  background: var(--c-white);
}

.f-input::placeholder { color: var(--c-inactive-text); }
.f-input:focus { border-color: var(--c-main); }

/* Date input */
.f-date {
  border: var(--border);
  font-size: 16px;
  line-height: 18.8px;
  padding: 12px;
  width: 100%;
  border-radius: 4px;
  color: var(--c-black);
  transition: border-color .25s;
  background: var(--c-white);
  font-family: Raleway, sans-serif;
}
.f-date:focus { border-color: var(--c-main); outline: none; }

/* ─── Button ──────────────────────────────────────────────── */
.f-button {
  display: block;
  width: 100%;
  outline: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .25s;
  font-family: Raleway, sans-serif;
}

.f-button--primary {
  color: var(--c-white);
  background-color: var(--c-main);
  border: 1px solid var(--c-main);
}

.f-button--secondary {
  color: var(--c-main);
  background-color: var(--c-white);
  border: 1px solid var(--c-main);
}

.f-button:hover { filter: saturate(200%); }
.f-button:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* ─── Warning msg ─────────────────────────────────────────── */
.msg--warning { --msg-color: var(--c-warning); }
.msg--error   { --msg-color: var(--c-error); }
.msg--info    { --msg-color: var(--c-inactive-text); }

.msg {
  display: flex;
  align-items: center;
  color: var(--msg-color);
  font-size: 14px;
  line-height: 16px;
  font-weight: 500;
}

.msg__icon { font-size: 18px; margin-right: 4px; }

/* ─── Doc card (rasmdagidek: fayl ikonka + chegara) ──────── */
.doc-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  padding: 18px 22px;
  background-color: #fbfffe;
  border: 2px solid var(--c-main-hover);
  cursor: default;
  transition: background-color .25s;
  border-radius: 4px;
  margin-bottom: 12px;
}

.doc-card > .icon-file {
  font-size: 2.5rem;
  color: #cecece;
  transition: color .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-card__info {
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-card__label {
  font-size: 17px;
  font-weight: 500;
  color: var(--c-black);
  transition: color .25s;
}

.doc-card__actions {
  display: flex;
  gap: 18px;
}

.doc-card__action-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-main);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s;
}

.doc-card__action-link:hover {
  color: var(--c-main-hover);
  text-decoration: underline;
}

.doc-card__action-link .icon-file,
.doc-card__action-link .icon-download {
  font-size: 14px;
}

/* Result kartochkasi hover effekti yo'q — faqat statik ko'rsatish */
.doc-card.result-card { cursor: default; }
.doc-card.result-card:hover { background-color: #fbfffe; }
.doc-card.result-card:hover .doc-card__label,
.doc-card.result-card:hover > .icon-file { color: inherit; }

/* ─── About apostille section ─────────────────────────────── */
.about-apostille-section { display: none; }
.about-apostille-section.show { display: grid; }

/* ─── Document section ────────────────────────────────────── */
.search-document-form {
  display: grid;
  grid-template-columns: minmax(40%, 330px) minmax(40%, 330px);
  align-items: end;
  grid-gap: 1.5rem;
}

@media screen and (max-width: 690px) {
  .search-document-form { grid-template-columns: minmax(auto, 330px); }
}

/* ─── Error / Success alerts ──────────────────────────────── */
.error-message {
  color: var(--c-error);
  padding: 10px;
  background: #ffebee;
  border-radius: 4px;
  margin: 10px 0;
  display: none;
  font-size: 14px;
}
.error-message.show { display: block; }

.success-message {
  color: #388e3c;
  padding: 10px;
  background: #e8f5e9;
  border-radius: 4px;
  margin: 10px 0;
  display: none;
  font-size: 14px;
}
.success-message.show { display: block; }

/* ─── reCAPTCHA status ────────────────────────────────────── */
.recaptcha-verification-status {
  padding: 8px 12px;
  border-radius: 4px;
  margin: 10px 0;
  display: none;
  font-size: 13px;
  font-weight: 500;
}
.recaptcha-verification-status.success {
  display: block; background: #e8f5e9; color: #2e7d32;
}
.recaptcha-verification-status.error {
  display: block; background: #ffebee; color: #c62828;
}

/* ─── About us ────────────────────────────────────────────── */
.about-us__p { margin-bottom: 10px; }
.about-us__p, .about-us__h { font-size: 1rem; color: var(--c-black); }
.about-us__h { font-weight: 700; margin-bottom: 3px; }

/* ─── Contacts ────────────────────────────────────────────── */
.contacts-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-main);
}

.contacts-card__list {
  margin-bottom: 1.5rem;
  border-bottom: var(--border);
}

.contacts-card__list-item {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.contacts-card__list-item-icon {
  margin-right: 10px;
  font-size: 1.3rem;
  color: var(--c-main);
}

.contacts-card__list-item-value--link {
  font-size: 1rem;
  color: var(--c-link);
}
.contacts-card__list-item-value--link:hover { text-decoration: underline; }

/* ─── Footer ──────────────────────────────────────────────── */
.app-footer {
  background: linear-gradient(0deg, rgba(0,0,0,.4), rgba(0,0,0,.4)),
              linear-gradient(0deg, #3ca398, #3ca398);
  padding: 10px 0;
}

.app-footer .container--max-width {
  display: flex;
  align-items: center;
}

.app-footer__dev-info {
  margin-right: auto;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--c-white);
}

.app-footer__logo {
  height: 40px;
  margin-right: 10px;
}

@media screen and (max-width: 800px) {
  .app-footer .container--max-width {
    flex-wrap: wrap; text-align: center; justify-content: center;
  }
  .app-footer__dev-info { padding-bottom: 10px; }
}

/* ─── Loading spinner ─────────────────────────────────────── */
.preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsla(0,0%,100%,.8);
}

.preloader__spinner-circular {
  display: inline;
  height: 150px; width: 150px;
  animation: loading-rotate 2s linear infinite;
}

.preloader__spinner-path {
  animation: loading-dash 1.5s ease-in-out infinite;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  stroke-width: 2;
  stroke: var(--c-main-hover);
  stroke-linecap: round;
  fill: none;
}

@keyframes loading-rotate { to { transform: rotate(1turn); } }
@keyframes loading-dash {
  0%  { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40px; }
  to  { stroke-dasharray: 90, 150; stroke-dashoffset: -120px; }
}

/* ─── Apostil result box ──────────────────────────────────── */
.apostille-result-box {
  border: 2px solid #17a2b8;
  border-radius: 4px;
  padding: 15px;
  background: #f0f8ff;
  margin: 15px 0;
  display: none;
}
.apostille-result-box.show { display: block; }

.apostille-result-box-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.apostille-result-icon { font-size: 40px; color: #17a2b8; }

.apostille-result-text { flex: 1; }
.apostille-result-text strong { color: #17a2b8; font-size: 15px; }

/* ─── Subtitle ────────────────────────────────────────────── */
.subtitle {
  font-size: 14px;
  line-height: 17.5px;
  color: var(--c-inactive-text);
}

@media screen and (max-width: 880px) {
  html { font-size: 12px; }
}

/* ─── Clickable card ─────────────────────────────────────── */
.clickable-card {
  cursor: pointer !important;
  transition: background-color .2s, box-shadow .2s;
}
.clickable-card:hover {
  background-color: #e8f8f7 !important;
  box-shadow: 0 4px 16px rgba(60,163,152,.18);
}
.clickable-card:hover > .icon-file { color: var(--c-main) !important; }
.clickable-card:hover .doc-card__label { color: var(--c-main) !important; }

.doc-card__hint {
  font-size: 12px;
  color: var(--c-inactive-text);
  font-style: italic;
}

/* ─── PDF Modal ──────────────────────────────────────────── */
.dlg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.dlg__content {
  background: var(--c-white, #fff);
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}

.pdf-modal-content {
  width: 90vw;
  height: 92vh;
  max-width: 1100px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dlg__content-head {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background-color: var(--c-main);
  flex-shrink: 0;
}

.dlg__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-white);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 12px;
}

.dlg__btn-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
  cursor: pointer;
}
.dlg__btn-close:hover { background: rgba(255,255,255,.4); }
.dlg__btn-close .icon-close { font-size: 12px; }

.pdf-modal-body {
  flex: 1;
  overflow: hidden;
  background: #525659;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ─── Modal toolbar tugmasi ──────────────────────────────── */
.dlg__toolbar-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 30px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  transition: background .2s;
  font-family: Raleway, sans-serif;
}
.dlg__toolbar-btn:hover { background: rgba(255,255,255,.3); }
