/* D63: scoped styling for filters introduced by D62; no API or timetable changes. */
@media screen {
  .raspored-matrix-header__right > form {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: min(100%, 480px);
    min-width: 0;
  }
  .raspored-matrix-header__right .raspored-matrix-header__mode-selector {
    width: 100%;
    justify-content: flex-end;
  }
  .raspored-archive .raspored-filter-panel {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .raspored-archive .raspored-filter-panel > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid #c8d7e9;
    border-radius: 8px;
    background: #f7fafe;
    color: #1e5fa8;
    font: 600 13px/1.4 system-ui, Arial, sans-serif;
    cursor: pointer;
    list-style-position: inside;
    user-select: none;
  }
  .raspored-archive .raspored-filter-panel > summary:hover,
  .raspored-archive .raspored-filter-panel > summary:focus-visible {
    background: #edf5ff;
    outline-offset: 2px;
  }
  .raspored-archive .raspored-filter-panel:not([open]) > .raspored-classroom-filters {
    display: none;
  }
  .raspored-archive .raspored-classroom-filters {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    width: min(510px, calc(100vw - 52px));
    padding: 16px;
    background: #fff;
    border: 1px solid #d7e1eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(30, 60, 100, .18);
  }
  .raspored-archive .raspored-classroom-filters label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
    color: #25364b;
    font: 600 13px/1.35 system-ui, Arial, sans-serif;
  }
  .raspored-archive .raspored-classroom-filters select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #b8c9d9;
    border-radius: 7px;
    background: #fff;
    color: #111;
    font: 400 13px/1.35 system-ui, Arial, sans-serif;
  }
  .raspored-archive .raspored-classroom-filters button[data-classroom-filter-submit] {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #1e5fa8;
    border-radius: 8px;
    background: #1e5fa8;
    color: #fff;
    font: 700 13px system-ui, Arial, sans-serif;
    cursor: pointer;
  }
  .raspored-archive .raspored-classroom-filters a[data-classroom-filter-reset] {
    justify-self: start;
    align-self: center;
    color: #1e5fa8;
    font: 600 13px system-ui, Arial, sans-serif;
    text-decoration: underline;
  }
  .raspored-archive .raspored-matrix-header__print-button {
    background: #1e5fa8 !important;
    border-color: #1e5fa8 !important;
    color: #fff !important;
  }
  .raspored-archive .raspored-matrix-header__print-button:hover,
  .raspored-archive .raspored-matrix-header__print-button:focus-visible {
    background: #f57c00 !important;
    border-color: #f57c00 !important;
  }
}
@media screen and (max-width: 700px) {
  .raspored-matrix-header__right > form {
    width: 100%;
    align-items: stretch;
  }
  .raspored-archive .raspored-filter-panel {
    justify-content: flex-start;
  }
  .raspored-archive .raspored-classroom-filters {
    left: 0;
    right: auto;
    grid-template-columns: 1fr;
    width: min(400px, calc(100vw - 40px));
    max-height: 65vh;
    overflow-y: auto;
  }
}
@media print {
  .raspored-matrix-header__right > form,
  .raspored-matrix-header__mode-selector,
  .raspored-filter-panel,
  .raspored-classroom-filters,
  .raspored-matrix-header__print-button {
    display: none !important;
  }
  .raspored-matrix-header__right { display: none !important; }
  .raspored-matrix-header { grid-template-columns: 1fr 2fr 1fr !important; }
  .raspored-matrix-header__center { grid-column: 2 !important; text-align: center !important; }
}

@media screen {
  .d83-public-tools__filter-panel[hidden] { display:none !important; }
  .d83-public-tools__filter-panel:not([hidden]) .raspored-classroom-filters {
    position:static;
    top:auto;
    left:auto;
    right:auto;
    z-index:auto;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:100%;
    max-height:none;
    overflow:visible;
    box-shadow:none;
  }
}
@media screen and (max-width:640px) {
  .d83-public-tools__filter-panel:not([hidden]) .raspored-classroom-filters { grid-template-columns:minmax(0,1fr); }
}
