/* =========================================================
   ATSE Vairag - inner public pages (blue theme)
   Loaded AFTER css/stylesheet.css and css/home.css on the
   public pages only. Restyles their existing markup; it does
   not change any page logic. Not used by admin or login pages.
   ========================================================= */

/* --- keep the new header/footer safe from old global button styles --- */
.atse-page .atse-menu-toggle {
  background: var(--atse-gold) !important; color: var(--atse-gold-ink) !important;
  border: 0 !important; box-shadow: none !important; padding: 0 !important;
  min-height: 0 !important; border-radius: 10px !important; transform: none !important;
}
.atse-page .atse-header a, .atse-page .atse-footer a, .atse-page .atse-topstrip a { text-decoration: none; }
.atse-page .atse-menu { margin-bottom: 0; }
.atse-page .atse-menu li { margin: 0; padding: 0; list-style: none; }
.atse-page .atse-footer-menu li { list-style: none; }
.atse-page .atse-footer p { margin: 4px 0 0; }

/* --- page frame --- */
.atse-page [name="tab_container"] { width: 100%; }
.atse-page .main_container {
  width: auto !important; max-width: 1240px; margin: 28px auto 48px !important;
  padding: 0 24px; min-height: 0 !important;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
  font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, sans-serif;
}
.atse-page .main_container > * { min-width: 0; }
.atse-page .main_container > :where(:not(.atseui-actual-links):not(.data_container):not(.page_highlighter)) { flex: 1 1 100%; }
/* pages that wrap the content card in a <form> or an extra div keep the sidebar layout */
.atse-page .main_container > form,
.atse-page .main_container > :has(> .data_container) { flex: 999 1 560px; }
.atse-page .main_container > form > .data_container,
.atse-page .main_container > div > .data_container { margin-top: 0 !important; }
.atse-page .main_container > div[style*="display:flex"],
.atse-page .main_container > div[style*="display: flex"] { flex: 1 1 100%; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.atse-page .main_container > div[style*="display:flex"] > .atseui-actual-links { flex: 1 1 290px; }
.atse-page .main_container > div[style*="display:flex"] > :not(.atseui-actual-links) { flex: 999 1 560px; min-width: 0; }
.atse-page .main_container img { max-width: 100%; height: auto; }

/* page title band */
.atse-page .page_highlighter {
  flex: 1 1 100%; width: auto !important; margin: 0 !important;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px !important; border: 0 !important; border-radius: 16px !important;
  background: var(--atse-blue) !important; color: #FFFFFF !important;
  font-family: 'Noto Serif Devanagari', serif !important; font-size: 24px !important;
  font-weight: 700 !important; line-height: 1.35; box-shadow: var(--atse-shadow-lg);
}
.atse-page .page_highlighter::before {
  content: ""; flex-shrink: 0; width: 6px; height: 28px; border-radius: 3px; background: var(--atse-gold);
}

/* main content card */
.atse-page .data_container {
  flex: 999 1 560px; display: block !important; width: auto !important; min-height: 0 !important;
  background: var(--atse-card); border-radius: 18px; padding: 24px !important;
  box-shadow: var(--atse-shadow); color: var(--atse-text);
}
.atse-page .data_container img { max-width: 100%; height: auto; }
.atse-page .content_p, .atse-page .info_class, .atse-page .data_container p {
  font-family: inherit !important; color: var(--atse-text) !important;
  font-size: 16px !important; line-height: 1.75 !important; text-align: left !important;
}
.atse-page .data_container h1, .atse-page .data_container h2, .atse-page .data_container h3 { color: var(--atse-blue); }
.atse-page .data_container a { color: var(--atse-sky); font-weight: 600; }
.atse-page .data_container a:hover { color: var(--atse-orange); }

/* side links panel (highlights.php) */
.atse-page .atseui-actual-links { flex: 1 1 290px; max-width: 100%; position: sticky; top: 16px; }
@media (min-width: 761px) {
  .atse-page .atseui-actual-links .atseui-links-list { grid-template-columns: minmax(0, 1fr) !important; }
  .atse-page .main_container > .atseui-actual-links, .atse-page .main_container > div > .atseui-actual-links { max-width: 330px; }
}

/* tables */
.atse-page .data_container table, .atse-page .main_container table { max-width: 100%; border-collapse: collapse; }
.atse-page .main_container th { background: var(--atse-blue); color: #FFFFFF; padding: 10px 12px; }
.atse-page .main_container td { padding: 8px 12px; }
.atse-page .table-responsive, .atse-page .atse-scroll { overflow-x: auto; }

/* form fields */
.atse-page .main_container input[type="text"], .atse-page .main_container input[type="email"],
.atse-page .main_container input[type="number"], .atse-page .main_container input[type="tel"],
.atse-page .main_container input[type="date"], .atse-page .main_container input[type="password"],
.atse-page .main_container select, .atse-page .main_container textarea,
.atse-page .order_txt, .atse-page .txtflds, .atse-page .receipt_info_box {
  font-family: inherit; font-size: 16px; color: var(--atse-text);
  border: 1.5px solid #C9D6EA !important; border-radius: 10px !important; background: #FFFFFF;
  min-height: 44px; padding: 8px 12px; max-width: 100%;
}
.atse-page .main_container textarea { min-height: 110px; }
.atse-page .main_container input:focus, .atse-page .main_container select:focus,
.atse-page .main_container textarea:focus {
  outline: none; border-color: var(--atse-sky) !important; box-shadow: 0 0 0 3px rgba(21,101,192,.18) !important;
}

/* buttons inside page content: blue theme instead of the old gradient */
.atse-page .main_container input[type="submit"], .atse-page .main_container input[type="button"],
.atse-page .main_container button[type="submit"], .atse-page .main_container button[type="button"],
.atse-page .main_container .reg_btn_form, .atse-page .main_container .login_btn, .atse-page .main_container .hall_ticket_btn {
  background: var(--atse-blue) !important; border: 0 !important; color: #FFFFFF !important;
  border-radius: 10px !important; min-height: 46px; padding: 10px 24px !important;
  font-family: inherit !important; font-size: 16px !important; font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(13,59,140,.25) !important; cursor: pointer;
}
.atse-page .main_container input[type="submit"]:hover, .atse-page .main_container input[type="button"]:hover,
.atse-page .main_container button[type="submit"]:hover, .atse-page .main_container button[type="button"]:hover,
.atse-page .main_container .reg_btn_form:hover, .atse-page .main_container .login_btn:hover, .atse-page .main_container .hall_ticket_btn:hover {
  background: var(--atse-orange) !important;
}

/* messages */
.atse-page .error_msgs, .atse-page .error_indicator, .atse-page .error_indicator_hall_ticket { color: var(--atse-red); font-size: 14px; }
.atse-page .reg_success { color: var(--atse-green); font-weight: 700; }

/* --- phone --- */
@media (max-width: 760px) {
  .atse-page .main_container { margin: 18px auto 32px !important; padding: 0 12px; gap: 16px; }
  .atse-page .page_highlighter { font-size: 19px !important; padding: 12px 16px !important; border-radius: 12px !important; }
  .atse-page .data_container { padding: 16px !important; border-radius: 14px; }
  .atse-page .atseui-actual-links { position: static; order: 5; }
  .atse-page .main_container table { display: block; overflow-x: auto; }
  .atse-page .main_container iframe { max-width: 100%; }
}

/* old inner boxes have fixed pixel widths (700px, 1000px...) - let them shrink to the screen */
.atse-page .data_container div, .atse-page .data_container form, .atse-page .data_container center,
.atse-page .data_container fieldset, .atse-page .data_container iframe, .atse-page .data_container hr {
  max-width: 100%; box-sizing: border-box;
}
@media (max-width: 760px) {
  .atse-page .data_container input, .atse-page .data_container select, .atse-page .data_container textarea { max-width: 100%; }
  .atse-page .data_container table { width: 100% !important; }
}
@media (max-width: 760px) {
  /* form layouts built with tables: stack label above field on phones */
  .atse-page .data_container table:has(input, select, textarea),
  .atse-page .data_container table:has(input, select, textarea) > tbody,
  .atse-page .data_container table:has(input, select, textarea) > tbody > tr,
  .atse-page .data_container table:has(input, select, textarea) > tbody > tr > td {
    display: block; width: 100% !important; height: auto !important;
  }
  .atse-page .data_container table:has(input, select, textarea) td { padding: 4px 0; }
  .atse-page .data_container input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
  .atse-page .data_container select, .atse-page .data_container textarea { width: 100% !important; }
  .atse-page .data_container img[style*="float"] { float: none !important; margin: 0 auto 12px !important; display: block; }
}

/* =================== Downloads page =================== */
.atse-page .page_highlighter.atse-dl-title::before { display: none; }
.atse-page .page_highlighter.atse-dl-title { gap: 16px; padding: 18px 22px !important; }
.atse-dl-title-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px;
  background: var(--atse-gold); color: var(--atse-gold-ink);
  display: flex; align-items: center; justify-content: center;
}
.atse-dl-title-icon svg { width: 28px; height: 28px; }
.atse-dl-title-text { display: flex; flex-direction: column; line-height: 1.3; }
.atse-dl-title-text small {
  font-family: 'Mukta', system-ui, sans-serif; font-size: 15px; font-weight: 500; color: #C9D8F2; margin-top: 2px;
}

.atse-dl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--atse-line); }
.atse-page .atse-dl-head h2 { margin: 0; font-size: 20px; color: var(--atse-blue); font-family: 'Noto Serif Devanagari', serif; }
.atse-dl-count { background: #DDE8F7; color: var(--atse-blue); font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 999px; }

.atse-dl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.atse-page .atse-dl-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: #FFFFFF; border: 1.5px solid var(--atse-line); color: var(--atse-text) !important;
  transition: border-color .15s, box-shadow .15s, transform .15s; height: 100%;
}
.atse-page .atse-dl-card:hover { border-color: var(--c); box-shadow: 0 8px 20px rgba(13,59,140,.12); transform: translateY(-2px); color: var(--atse-text) !important; }
.atse-dl-card.is-pdf { --c: var(--atse-red); --cbg: #FBE0E0; }
.atse-dl-card.is-img { --c: var(--atse-sky); --cbg: #DDE8F7; }
.atse-dl-icon {
  position: relative; flex-shrink: 0; width: 54px; height: 60px; border-radius: 12px;
  background: var(--cbg); color: var(--c); display: flex; align-items: center; justify-content: center;
}
.atse-dl-icon svg { width: 28px; height: 28px; margin-top: -8px; }
.atse-dl-ext {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: var(--c); color: #FFFFFF; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 4px; line-height: 1.4;
}
.atse-dl-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.atse-dl-name { font-size: 17px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.atse-dl-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--atse-text-2); }
.atse-dl-meta svg { width: 14px; height: 14px; }
.atse-dl-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: var(--atse-blue); color: #FFFFFF; font-weight: 700; font-size: 14px;
  padding: 9px 14px; border-radius: 10px; min-height: 40px; transition: background .15s;
}
.atse-dl-btn svg { width: 17px; height: 17px; }
.atse-dl-card:hover .atse-dl-btn { background: var(--atse-orange); }
.atse-dl-empty { text-align: center; padding: 40px 16px; color: var(--atse-text-2); }
.atse-dl-empty svg { width: 48px; height: 48px; color: #9FB4D6; }

@media (max-width: 760px) {
  .atse-dl-title-icon { width: 42px; height: 42px; }
  .atse-dl-title-icon svg { width: 22px; height: 22px; }
  .atse-dl-title-text small { font-size: 13px; }
  .atse-dl-list { grid-template-columns: minmax(0, 1fr); }
  .atse-dl-btn { padding: 8px 10px; font-size: 0; gap: 0; }
  .atse-dl-btn svg { width: 20px; height: 20px; }
}

/* =================== Contact page =================== */
.atse-page .atse-contact {
  flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start;
}
.atse-contact-info { background: var(--atse-blue); color: #FFFFFF; border-radius: 18px; padding: 26px; box-shadow: var(--atse-shadow-lg); }
.atse-page .atse-contact-info h2 { margin: 0; font-family: 'Noto Serif Devanagari', serif; font-size: 24px; color: var(--atse-gold); }
.atse-contact-org { margin: 4px 0 20px !important; color: #C9D8F2 !important; font-size: 15px !important; }
.atse-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.atse-contact-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.08); }
.atse-contact-list li > span:last-child { display: flex; flex-direction: column; font-size: 16px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.atse-contact-list strong { font-size: 13px; font-weight: 700; color: var(--atse-gold); letter-spacing: .03em; }
.atse-page .atse-contact-list a { color: #FFFFFF; font-weight: 600; }
.atse-page .atse-contact-list a:hover { color: var(--atse-gold); }
.atse-contact-ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--atse-gold); color: var(--atse-gold-ink); display: flex; align-items: center; justify-content: center; }
.atse-contact-ico svg { width: 22px; height: 22px; }

.atse-contact-form-card { background: var(--atse-card); border-radius: 18px; padding: 26px; box-shadow: var(--atse-shadow); }
.atse-page .atse-contact-form-card h2 { margin: 0; font-family: 'Noto Serif Devanagari', serif; font-size: 24px; color: var(--atse-blue); }
.atse-contact-help { margin: 4px 0 18px !important; color: var(--atse-text-2); font-size: 15px; }

.atse-form { display: flex; flex-direction: column; gap: 16px; }
.atse-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.atse-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.atse-field label { font-size: 15px; font-weight: 700; color: var(--atse-text); }
.atse-page .atse-field input, .atse-page .atse-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px !important; font-family: inherit; font-size: 16px; color: var(--atse-text);
  background: #F7FAFE !important; border: 1.5px solid #C9D6EA !important; border-radius: 12px !important; box-shadow: none !important;
}
.atse-page .atse-field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.atse-page .atse-field input:focus, .atse-page .atse-field textarea:focus {
  outline: none; background: #FFFFFF !important; border-color: var(--atse-sky) !important; box-shadow: 0 0 0 3px rgba(21,101,192,.18) !important;
}
.atse-field input::placeholder, .atse-field textarea::placeholder { color: #8A97AD; }
.atse-page .atse-field.has-error input, .atse-page .atse-field.has-error textarea { border-color: var(--atse-red) !important; background: #FFF6F6 !important; }
.atse-field-err { color: var(--atse-red); font-size: 14px; font-weight: 600; }

.atse-captcha-row { display: flex; gap: 12px; align-items: stretch; }
.atse-captcha-code {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-width: 110px; padding: 0 16px; border-radius: 12px;
  background: repeating-linear-gradient(45deg, #FFF1C7, #FFF1C7 8px, #FFE7A8 8px, #FFE7A8 16px);
  border: 1.5px dashed #B8860B; color: #5A3A00; font-size: 24px; font-weight: 800; letter-spacing: .25em; font-family: 'Courier New', monospace; user-select: none;
}
.atse-captcha-row input { flex: 1 1 auto; }

.atse-page .atse-submit, .atse-page .main_container button.atse-submit {
  align-self: flex-start; display: inline-flex !important; align-items: center; gap: 10px;
  min-height: 50px; padding: 12px 32px !important; font-size: 17px !important;
}
.atse-submit svg { width: 20px; height: 20px; }

.atse-alert { padding: 12px 16px; border-radius: 12px; font-weight: 700; margin-bottom: 14px; }
.atse-alert-ok { background: #DFF1E0; color: #1B5E20; border: 1.5px solid #9CCC9F; }
.atse-alert-err { background: #FBE0E0; color: #8A1C1C; border: 1.5px solid #E8A3A3; }

.atse-contact-map { grid-column: 1 / -1; border-radius: 18px; overflow: hidden; box-shadow: var(--atse-shadow); background: #DCE6F4; border: 4px solid #FFFFFF; }
.atse-contact-map iframe { display: block; width: 100%; height: 380px; border: 0; }

@media (max-width: 900px) {
  .atse-page .atse-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .atse-contact-info, .atse-contact-form-card { padding: 18px; border-radius: 14px; }
  .atse-form-row { grid-template-columns: minmax(0, 1fr); }
  .atse-page .atse-submit { align-self: stretch; justify-content: center; }
  .atse-contact-map iframe { height: 280px; }
}
/* contact: map sits under the details on the left, form spans the right column */
@media (min-width: 901px) {
  .atse-page .atse-contact-info { grid-column: 1; grid-row: 1; }
  .atse-page .atse-contact-map { grid-column: 1; grid-row: 2; }
  .atse-page .atse-contact-map iframe { height: 300px; }
  .atse-page .atse-contact-form-card { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  .atse-page .main_container button.atse-submit { align-self: stretch; justify-content: center; }
}

/* =================== Feedback page (reuses contact layout) =================== */
@media (min-width: 901px) {
  .atse-page .atse-feedback .atse-contact-form-card { grid-row: 1; }
}
.atse-captcha-math { letter-spacing: .08em; font-size: 22px; min-width: 130px; }
