/* ============================================================
   SHARE MARKET GYAN
   TOOLS / CALENDARS
============================================================ */


/* ============================================================
   GLOBAL
============================================================ */

#dividend-calendar-page {
  width: 100%;
}


/* ============================================================
   BREADCRUMB
============================================================ */

.tools-breadcrumb {
  padding: 14px 0;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.tools-breadcrumb nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.tools-breadcrumb a {
  color: #475569;
  text-decoration: none;
}

.tools-breadcrumb a:hover {
  text-decoration: underline;
}

.tools-breadcrumb span {
  color: #94a3b8;
}


/* ============================================================
   HERO
============================================================ */

.tools-hero {
  padding: 52px 0 48px;
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #eef4ff 100%
  );
  border-bottom: 1px solid #e5e7eb;
}

.tools-hero-content {
  max-width: 850px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tools-hero h1 {
  margin: 0 0 14px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
}

.tools-hero p {
  max-width: 760px;
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.75;
}

.tools-data-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
}

.tools-data-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.tools-data-info i {
  color: #2563eb;
}

.tools-data-info strong {
  color: #334155;
}


/* ============================================================
   MAIN SECTION
============================================================ */

.dividend-calendar-section {
  padding: 42px 0 70px;
}


/* ============================================================
   FILTER PANEL
============================================================ */

.calendar-filter-panel {
  display: grid;
  grid-template-columns:
    minmax(250px, 2fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    auto;

  gap: 16px;

  padding: 22px;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 14px;

  box-shadow:
    0 4px 18px rgba(15, 23, 42, 0.05);

  margin-bottom: 22px;
}

.calendar-search,
.calendar-filter {
  min-width: 0;
}

.calendar-search label,
.calendar-filter label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  top: 50%;
  left: 14px;

  transform: translateY(-50%);

  color: #94a3b8;

  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  height: 44px;

  padding: 0 14px 0 40px;

  border: 1px solid #cbd5e1;

  border-radius: 9px;

  background: #ffffff;

  color: #0f172a;

  font-family: inherit;
  font-size: 14px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input-wrapper input:focus {
  border-color: #2563eb;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.10);
}

.calendar-filter input,
.calendar-filter select,
.calendar-sort select {
  width: 100%;
  height: 44px;

  padding: 0 12px;

  border: 1px solid #cbd5e1;

  border-radius: 9px;

  background: #ffffff;

  color: #0f172a;

  font-family: inherit;
  font-size: 14px;

  outline: none;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.calendar-filter input:focus,
.calendar-filter select:focus,
.calendar-sort select:focus {
  border-color: #2563eb;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.10);
}

.calendar-filter-action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.calendar-reset-btn {
  height: 44px;

  padding: 0 18px;

  border: 1px solid #cbd5e1;

  border-radius: 9px;

  background: #f8fafc;

  color: #334155;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.calendar-reset-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.calendar-reset-btn i {
  margin-right: 6px;
}


/* ============================================================
   QUICK FILTERS
============================================================ */

.quick-filter-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;

  margin-bottom: 30px;
}

.quick-filter-title {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.quick-filter-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filter-btn {
  min-height: 36px;

  padding: 0 14px;

  border: 1px solid #dbe3ec;

  border-radius: 999px;

  background: #ffffff;

  color: #475569;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.quick-filter-btn:hover {
  border-color: #93c5fd;
  color: #2563eb;
}

.quick-filter-btn.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}


/* ============================================================
   RESULTS HEADER
============================================================ */

.calendar-results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 18px;
}

.calendar-results-header h2 {
  margin: 0 0 5px;

  font-family: "Poppins", sans-serif;

  color: #0f172a;

  font-size: 24px;
  line-height: 1.3;
}

.calendar-results-header p {
  margin: 0;

  color: #64748b;

  font-size: 13px;
}

.calendar-sort {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 260px;
}

.calendar-sort label {
  flex: 0 0 auto;

  color: #475569;

  font-size: 12px;
  font-weight: 700;
}

.calendar-sort select {
  min-width: 215px;
}


/* ============================================================
   TABLE
============================================================ */

.calendar-table-wrapper {
  width: 100%;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 14px;

  box-shadow:
    0 4px 18px rgba(15, 23, 42, 0.04);
}

.table-scroll {
  width: 100%;

  overflow-x: auto;
}

.dividend-table {
  width: 100%;

  min-width: 1050px;

  border-collapse: collapse;
}

.dividend-table thead {
  background: #f8fafc;
}

.dividend-table th {
  padding: 15px 16px;

  border-bottom: 1px solid #e2e8f0;

  color: #475569;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 0.04em;

  text-align: left;

  white-space: nowrap;
}

.dividend-table td {
  padding: 16px;

  border-bottom: 1px solid #eef2f7;

  color: #334155;

  font-size: 13px;

  line-height: 1.5;

  vertical-align: top;
}

.dividend-table tbody tr {
  transition:
    background 0.15s ease;
}

.dividend-table tbody tr:hover {
  background: #f8fbff;
}

.dividend-table tbody tr:last-child td {
  border-bottom: 0;
}

.dividend-table .date-cell {
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
}

.dividend-table .company-cell {
  min-width: 230px;

  color: #0f172a;

  font-weight: 700;
}

.dividend-table .symbol-cell {
  color: #2563eb;

  font-weight: 700;

  white-space: nowrap;
}

.dividend-table .purpose-cell {
  min-width: 300px;

  color: #475569;
}


/* ============================================================
   MOBILE CARDS
============================================================ */

.dividend-mobile-list {
  display: none;

  width: 100%;
}

.dividend-mobile-card {
  padding: 18px;

  margin-bottom: 12px;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 14px;

  box-shadow:
    0 3px 12px rgba(15, 23, 42, 0.04);
}

.mobile-card-top {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid #eef2f7;
}

.mobile-card-top h3 {
  margin: 0 0 5px;

  color: #0f172a;

  font-family: "Poppins", sans-serif;

  font-size: 16px;

  line-height: 1.4;
}

.mobile-symbol {
  color: #2563eb;

  font-size: 12px;

  font-weight: 700;
}

.mobile-date {
  flex: 0 0 auto;

  padding: 8px 10px;

  border-radius: 9px;

  background: #eff6ff;

  text-align: right;
}

.mobile-date small {
  display: block;

  margin-bottom: 2px;

  color: #64748b;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.04em;
}

.mobile-date strong {
  color: #2563eb;

  font-size: 12px;
}

.mobile-purpose {
  padding: 14px 0;

  color: #334155;

  font-size: 13px;

  line-height: 1.6;
}

.mobile-card-details {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 10px;
}

.mobile-card-details > div {
  padding: 10px;

  border-radius: 8px;

  background: #f8fafc;
}

.mobile-card-details span {
  display: block;

  margin-bottom: 4px;

  color: #64748b;

  font-size: 10px;
}

.mobile-card-details strong {
  display: block;

  color: #334155;

  font-size: 12px;
}


/* ============================================================
   LOADING / EMPTY / ERROR STATES
============================================================ */

.calendar-state {
  padding: 70px 20px;

  text-align: center;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 14px;
}

.calendar-state h3 {
  margin: 15px 0 7px;

  color: #0f172a;

  font-family: "Poppins", sans-serif;

  font-size: 19px;
}

.calendar-state p {
  max-width: 500px;

  margin: 0 auto;

  color: #64748b;

  font-size: 14px;

  line-height: 1.6;
}

.calendar-spinner {
  width: 38px;
  height: 38px;

  margin: 0 auto;

  border: 3px solid #dbeafe;

  border-top-color: #2563eb;

  border-radius: 50%;

  animation:
    dividendSpinner 0.8s linear infinite;
}

@keyframes dividendSpinner {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }

}

.calendar-state-icon {
  width: 54px;
  height: 54px;

  display: flex;

  align-items: center;
  justify-content: center;

  margin: 0 auto;

  border-radius: 50%;

  background: #f1f5f9;

  color: #64748b;

  font-size: 22px;
}

.calendar-error-state {
  border-color: #fecaca;

  background: #fffafa;
}

.calendar-error-state
.calendar-state-icon {
  background: #fee2e2;

  color: #dc2626;
}

.calendar-primary-btn {
  margin-top: 20px;

  min-height: 42px;

  padding: 0 18px;

  border: 0;

  border-radius: 8px;

  background: #2563eb;

  color: #ffffff;

  font-family: inherit;

  font-size: 13px;

  font-weight: 700;

  cursor: pointer;
}

.calendar-primary-btn:hover {
  background: #1d4ed8;
}


/* ============================================================
   DISCLAIMER
============================================================ */

.calendar-disclaimer {
  display: flex;

  align-items: flex-start;

  gap: 12px;

  margin-top: 22px;

  padding: 16px 18px;

  border: 1px solid #e2e8f0;

  border-radius: 10px;

  background: #f8fafc;
}

.calendar-disclaimer i {
  flex: 0 0 auto;

  margin-top: 2px;

  color: #64748b;

  font-size: 15px;
}

.calendar-disclaimer p {
  margin: 0;

  color: #64748b;

  font-size: 11px;

  line-height: 1.65;
}


/* ============================================================
   HIDDEN ATTRIBUTE
============================================================ */

[hidden] {
  display: none !important;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1100px) {

  .calendar-filter-panel {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .calendar-search {
    grid-column: 1 / -1;
  }

  .calendar-filter-action {
    justify-content: flex-end;
  }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 767px) {

  .tools-breadcrumb {
    padding: 11px 0;
  }

  .tools-breadcrumb nav {
    font-size: 12px;
  }


  .tools-hero {
    padding: 36px 0 34px;
  }

  .tools-hero h1 {
    font-size: 32px;
  }

  .tools-hero p {
    font-size: 14px;

    line-height: 1.7;
  }

  .tools-data-info {
    align-items: flex-start;

    flex-direction: column;

    gap: 9px;

    margin-top: 18px;
  }


  .dividend-calendar-section {
    padding: 25px 0 45px;
  }


  .calendar-filter-panel {
    grid-template-columns: 1fr;

    gap: 13px;

    padding: 16px;

    border-radius: 12px;
  }

  .calendar-search {
    grid-column: auto;
  }

  .calendar-filter-action {
    display: block;
  }

  .calendar-reset-btn {
    width: 100%;
  }


  .quick-filter-section {
    align-items: flex-start;

    flex-direction: column;

    gap: 9px;

    margin-bottom: 24px;
  }

  .quick-filter-buttons {
    width: 100%;

    overflow-x: auto;

    flex-wrap: nowrap;

    padding-bottom: 4px;
  }

  .quick-filter-btn {
    flex: 0 0 auto;
  }


  .calendar-results-header {
    align-items: flex-start;

    flex-direction: column;

    gap: 14px;

    margin-bottom: 14px;
  }

  .calendar-results-header h2 {
    font-size: 21px;
  }

  .calendar-sort {
    width: 100%;

    min-width: 0;

    align-items: stretch;

    flex-direction: column;

    gap: 6px;
  }

  .calendar-sort select {
    width: 100%;

    min-width: 0;
  }


  /*
     Mobile uses cards instead of table.
  */

  .calendar-table-wrapper {
    display: none !important;
  }

  .dividend-mobile-list {
    display: block;
  }


  .calendar-state {
    padding: 55px 16px;
  }


  .calendar-disclaimer {
    padding: 14px;

    gap: 9px;
  }

  .calendar-disclaimer p {
    font-size: 10px;
  }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 420px) {

  .tools-hero h1 {
    font-size: 28px;
  }

  .mobile-card-top {
    gap: 9px;
  }

  .mobile-card-top h3 {
    font-size: 14px;
  }

  .mobile-date {
    padding: 7px 8px;
  }

  .mobile-card-details {
    grid-template-columns: 1fr 1fr;
  }

}