/**
 * Innovate India - Meri Ek Kahani (Story Writing Challenge 2026)
 * Redesigned Important Documents Notification Popup & Inline Component
 * Features:
 * - Left Panel (55%): Full Background Poster (मेरी एक कहानी_ नदी किनारे लेखन challenge)
 * - Right Panel (45%): Important Docs Category Cards & Action Pills
 * - 18px Border Radius, Modern Translucent Backdrop, Fully Responsive
 */

/* ==========================================================
   1. SECTION & CARD CONTAINER
   ========================================================== */
.mek-section {
  padding: 35px 0 25px;
  background-color: #fcfcfc;
  border-bottom: 1px solid #ebebeb;
}

.mek-card {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
  background: #ffffff;
  border: none;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  margin: 0 auto;
  width: 100%;
  min-height: 480px;
}

/* ==========================================================
   2. LEFT COLUMN (55%): FULL BACKGROUND POSTER
   ========================================================== */
.mek-col-left {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 55%;
  -ms-flex: 0 0 55%;
  flex: 0 0 55%;
  max-width: 55%;
  min-height: 480px;
  background-color: #fbf5ee; /* Warm subtle fallback */
  background-image: url("../extra-images/meri-ek-kahani/nadi-kinare-lekhan.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  position: relative;
  overflow: hidden;
}

/* Accessible full-fill link to open full poster document */
.mek-col-left-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  cursor: pointer;
  text-decoration: none;
  outline: none;
}

.mek-col-left-link:focus {
  box-shadow: inset 0 0 0 3px rgba(241, 89, 42, 0.6);
}

/* ==========================================================
   3. RIGHT COLUMN (45%): IMPORTANT DOCS & CATEGORY PILLS
   ========================================================== */
.mek-col-right {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 45%;
  -ms-flex: 0 0 45%;
  flex: 0 0 45%;
  max-width: 45%;
  padding: 26px 28px 24px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  justify-content: flex-start;
  background: #ffffff;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

/* Heading */
.mek-heading-wrap {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1592a;
}

.mek-heading-title {
  margin: 0 0 4px 0;
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Roboto Condensed", sans-serif;
}

.mek-heading-title i {
  color: #f1592a;
  font-size: 21px;
}

.mek-heading-sub {
  margin: 0;
  font-size: 13px;
  color: #666666;
  font-weight: 600;
}

/* Category List */
.mek-categories-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.mek-category-item {
  background: #fafafa;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.mek-category-item:hover {
  background: #ffffff;
  border-color: #f1592a;
  box-shadow: 0 3px 12px rgba(241, 89, 42, 0.08);
}

.mek-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mek-cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #1e293b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.mek-category-item:hover .mek-cat-badge {
  background: #f1592a;
}

.mek-cat-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #2b303a;
  line-height: 1.3;
}

/* Pill Action Buttons */
.mek-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mek-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  color: #f1592a;
  background: #ffffff;
  border: 1.5px solid #f1592a;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mek-pill i {
  font-size: 13px;
}

.mek-pill:hover,
.mek-pill:focus {
  background: #f1592a;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(241, 89, 42, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.mek-pill:active {
  transform: translateY(0);
}

.mek-pill-hindi {
  font-family: inherit;
}

/* ==========================================================
   4. MODAL POPUP & BACKDROP
   ========================================================== */
.mek-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99990;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mek-modal-backdrop.mek-active {
  display: block;
  opacity: 1;
}

.mek-modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: 92%;
  max-width: 980px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 18px;
  box-shadow:
    0 25px 60px -10px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 99999;
  display: none;
  opacity: 0;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mek-modal-dialog.mek-active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.mek-modal-dialog .mek-card {
  border: none;
  box-shadow: none;
  border-radius: 18px;
  margin: 0;
}

/* Accessible Circular Close Button */
.mek-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: #1e293b;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100001;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.mek-modal-close-btn:hover,
.mek-modal-close-btn:focus {
  background: #f1592a;
  color: #ffffff;
  transform: rotate(90deg);
  outline: none;
}

/* Floating Reopen Trigger Badge (Compact Pill with Logo) */
.mek-reopen-badge {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 99980;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid #f1592a;
  border-radius: 50px;
  padding: 30px 20px;
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-sizing: border-box;
}

.mek-reopen-logo {
  display: block;
  height: 50px;
  /* max-height: 32px; */
  width: auto;
  max-width: 165px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.mek-reopen-badge:hover {
  background: #000000e5;
  border-color: #ff6d3b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(241, 89, 42, 0.45);
}

.mek-reopen-badge:active {
  transform: translateY(0);
}

.mek-reopen-badge:focus-visible {
  box-shadow:
    0 0 0 3px rgba(241, 89, 42, 0.5),
    0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ==========================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================== */
@media (max-width: 991px) {
  .mek-col-left {
    -webkit-flex: 0 0 50%;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
    min-height: 480px;
  }

  .mek-col-right {
    -webkit-flex: 0 0 50%;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 22px 20px;
  }

  .mek-heading-title {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .mek-card {
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    min-height: auto;
    border-radius: 18px;
  }

  .mek-col-left {
    -webkit-flex: 0 0 100%;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    height: 280px;
    min-height: 280px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 0;
    background-position: center center;
    background-size: cover;
  }

  .mek-col-right {
    -webkit-flex: 0 0 100%;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 20px 16px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
  }

  .mek-modal-dialog {
    width: 95%;
    max-height: 94vh;
    margin: 10px auto;
    border-radius: 18px;
  }

  .mek-modal-close-btn {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .mek-reopen-badge {
    bottom: 15px;
    left: 15px;
    height: 40px;
    max-height: 40px;
    max-width: 150px;
    padding: 4px 12px;
  }

  .mek-reopen-logo {
    height: 25px;
    max-height: 25px;
    max-width: 125px;
  }
}
