/*
 Theme Name:   Astra Child
 Description:  ASÜS Theme
 Author:       Michael Kinzl
 Author URI:   
 Template:     astra
 Version:      1.0
 Text Domain:  astra-child
*/

/* ------------------------------------ */
/* Color Schema                         */
/* ------------------------------------ */

:root {
    --primary: #2b85d4;
    --secondary: #1867a9;
    --bg-dark: #105793;
    --box-shadow: 2px 2px 4px rgba(0,0,0,0.15);
}

/* ------------------------------------ */
/* Home                                 */
/* ------------------------------------ */

.ast-theme-transparent-header #masthead {
	position: relative;
}
.ast-theme-transparent-header .ast-above-header,
.ast-theme-transparent-header .ast-above-header.ast-above-header-bar {
	background-color: var(--ast-global-color-4);
}
.ast-theme-transparent-header .main-header-bar,
.ast-theme-transparent-header.ast-header-break-point .main-header-bar {
	background-color: var(--ast-global-color-0);
}
.ast-theme-transparent-header .ast-below-header, .ast-theme-transparent-header .ast-below-header.ast-below-header-bar {
	background-color: #eeeeee;
}

/* ------------------------------------ */
/* Header                               */
/* ------------------------------------ */

ul.wpm-language-switcher {
    display: flex;
    gap: 8px;
}
.wpm-switcher-list li a {
    color: #797979;
}

.ast-above-header-wrap .main-navigation ul {
    margin-left: 0em;
}
.ast-main-header-wrap .main-navigation ul {
    margin-right: 0em;
}

/* ------------------------------------ */
/* Slides                               */
/* ------------------------------------ */

.ast-below-header-wrap .ast-builder-grid-row {
    grid-template-columns: auto;
}
.ast-below-header-wrap .ast-builder-grid-row aside {
    width: 100%;
    padding: 0;
}
.ast-below-header-wrap .ast-builder-grid-row aside > section > p {
    display: none;
}

/* ------------------------------------ */
/* Layout                               */
/* ------------------------------------ */

#content {
    width: 100%;
    max-width: 1240px;
    margin: auto;
    padding-left: 10px;
    padding-right: 10px;
}

/* ------------------------------------ */
/* Content                              */
/* ------------------------------------ */

#content p {
    margin-bottom: 1.0rem;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
    margin-bottom: 0.5rem;
}

body.elementor-page h1.entry-title {
    margin-top: 30px;
    margin-left: 10px;
}

body.page .pods-ui-notice {
    display: none;
}

/* ------------------------------------ */
/* Pods                                 */
/* ------------------------------------ */

/* ---------- Tabelle ---------- */
.asues-news {
  width: 100%; border-collapse: collapse; border: 0;
  font-size: 15px; color: #555;
}
.asues-news th,
.asues-news td { border: 1px solid #d0d0d0; }

/* äußere Ränder entfernen */
.asues-news tr > :first-child { border-left: 0; }
.asues-news tr > :last-child  { border-right: 0; }
.asues-news thead th          { border-top: 0; }
.asues-news tbody tr:last-child td { border-bottom: 0; }

.asues-news th {
  background: #e3eff7; color: #3a8fc8; font-weight: 600;
  text-align: left; padding: 10px 14px; white-space: nowrap;
}
.asues-news th:first-child { text-align: center; }
.asues-news td { padding: 12px 14px; vertical-align: top; }
.asues-news td.col-date { background: #e3eff7; font-weight: 700; white-space: nowrap; }
.asues-news td.col-docs { background: #f2f2f2; }

/* ---------- Dokumentliste ---------- */
.asues-news .doc-list { list-style: none; margin: 0; padding: 0; }
.asues-news .doc-list li { line-height: 22px; margin: 0; }
.asues-news .doc-list li::before { content: none; }

.asues-news a.doc {
  display: block; padding-left: 24px;
  color: #3a8fc8; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: no-repeat left center / 16px 16px;
}
.asues-news a.doc:hover { text-decoration: underline; }

/* ---------- Dateityp-Icons ---------- */
.asues-news a.doc {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 1h7l3 3v11H3z' fill='%23888'/><path d='M10 1v3h3' fill='%23bbb'/></svg>");
}
.asues-news a.doc[data-mime*="pdf"] {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='2' fill='%23e2231a'/><text x='8' y='11' font-family='Arial' font-size='6' font-weight='bold' fill='white' text-anchor='middle'>PDF</text></svg>");
}
.asues-news a.doc[data-mime*="word"] {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='2' fill='%232b579a'/><text x='8' y='12.5' font-family='Arial' font-size='11' font-weight='bold' fill='white' text-anchor='middle'>W</text></svg>");
}
.asues-news a.doc[data-mime*="excel"],
.asues-news a.doc[data-mime*="spreadsheet"],
.asues-news a.doc[data-mime*="csv"] {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='2' fill='%23217346'/><text x='8' y='12.5' font-family='Arial' font-size='11' font-weight='bold' fill='white' text-anchor='middle'>X</text></svg>");
}
.asues-news a.doc-link {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233a8fc8' stroke-width='1.4'><circle cx='8' cy='8' r='6.5'/><ellipse cx='8' cy='8' rx='3' ry='6.5'/><path d='M1.5 8h13M2.5 4.5h11M2.5 11.5h11'/></svg>");
}

/* ---------- Mobil: Zeilen als Karten ---------- */
@media (max-width: 700px) {
  .asues-news thead { display: none; }
  .asues-news tr, .asues-news td { display: block; }
  .asues-news tr { border: 1px solid #ddd; margin-bottom: 30px; }
  .asues-news td { border: 0; padding: 6px 12px; }
  .asues-news td::before {
    content: attr(data-label); display: block;
    font-size: 12px; color: #3a8fc8; font-weight: 600;
  }
}

/* ------------------------------------ */
/* Shops                                */
/* ------------------------------------ */

.uef-shops-wrap { overflow-x: auto; }
.uef-shops {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 1.5em;
    border: none;
}
.uef-shops th,
.uef-shops td {
    padding: 10px 12px;
    text-align: left;
    border: none;
    border-bottom: 1px solid #dde3e8;
    vertical-align: middle;
}
.uef-shops thead th {
    background: #e3f0f7;
    color: #2a7ab8;
    font-weight: 700;
    border-bottom: 1px solid #cfdde6;
}
.uef-shops tbody tr { background: #fff; color: #333; }
.uef-shops a {
    color: #2a7ab8;
    text-decoration: none;
}
.uef-shops a:hover { text-decoration: underline; }
/* Inaktive Shops: grau */
.uef-shops tr.uef-inactive {
    background: #efefef;
    color: #8c8c8c;
}
.uef-shops tr.uef-inactive .uef-shop-name { color: #8c8c8c; cursor: default; }
.uef-shops .uef-col-id { width: 3em; color: #555; }
.uef-shops tr.uef-inactive .uef-col-id { color: #8c8c8c; }
.uef-shops .uef-col-products { width: 6em; text-align: right; }

/* ------------------------------------ */
/* Focus                                */
/* ------------------------------------ */

[data-section="section-header-mobile-trigger"] .ast-button-wrap .ast-mobile-menu-trigger-minimal:focus,
a.menu-link,
li.polylang-item a,
.ast-mobile-popup-drawer.active .menu-toggle-close:focus, #ast-scroll-top:focus, #coupon_code:focus, #ast-coupon-code:focus {
	border: none !important;
    outline: none;
}

/* ------------------------------------ */
/* Blog                                 */
/* ------------------------------------ */

.wp-block-latest-posts__post-title {
    font-size: 1.2rem !important;
    margin-bottom: 0px !important;
}
.wp-block-latest-posts__post-date {
	font-size: 0.7rem !important;
    margin-top: 0;
}

.wp-block-latest-posts__list.wp-block-latest-posts-is-layout-flow {
    padding-left: 0px;
}
.wp-block-latest-posts > li > *, .wp-block-latest-posts:not(.is-grid) > li {
	margin-bottom: 20px;
}

#secondary .sidebar-main aside {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}
#secondary .sidebar-main aside .wp-block-latest-posts__post-title {
    font-size: 1.0rem !important;
}
#secondary .sidebar-main aside ul.wp-block-latest-posts__list {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}
#secondary .sidebar-main aside ul.wp-block-latest-posts__list li {
    margin-bottom: 0px;
    line-height: 1em;
}

.navigation.post-navigation {
    display: none;
}

/* ------------------------------------ */
/* Mobile                               */
/* ------------------------------------ */

body.home .n2-section-smartslider,
body.home .n2-ss-slide {
    max-height: 600px !important;
    overflow: hidden;
}

body:not(.home) .n2-section-smartslider,
body:not(.home) .n2-ss-slide {
    max-height: 460px !important;
    overflow: hidden;
}
body:not(.home) header .site-below-header-wrap .n2-ss-widget {
    display: none !important;
}

.ast-header-break-point .ast-builder-menu-mobile .main-navigation {
    border-bottom: solid 1px #eaeaea;   
}
.ast-builder-menu-mobile .main-navigation .main-header-menu {
    padding: 20px;
}
.ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item > .menu-link {
	padding-top: 0px;
	padding-bottom: 0px;
}

@media (max-width: 921px) {
    
    .ast-plain-container, .ast-page-builder-template {
        background-color: #fff;
        background-image: none;
    }
    
    [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
        width: 32px;
        height: 32px;
        fill: var(--ast-global-color-0);
    }
    
    header {
        display: flex;
        flex-direction: column-reverse;
    }
    header #ast-desktop-header {
        display: block !important;
    }
    header #ast-desktop-header .ast-above-header-wrap,
    header #ast-desktop-header .ast-main-header-wrap  {
        display: none !important;
    }
    
    header .site-below-header-wrap {
        width: 100%;
    }
    header .site-below-header-wrap .n2-ss-widget {
        display: none !important;
    }

}

/* FIXME
 * - Mobile Menu looks crap
 */

