/**
 * Cassiopeia Dark - User Customizations
 * @package     Joomla.Site
 * @subpackage  Templates.cassiopeia-dark
 *
 * Place your custom CSS overrides here.
 * This file is loaded after template.css.
 * Version: 1.0.5
 */

/* === Language Flags in Titlebar === */
.cd-lang-flags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 12px;
}

.cd-lang-flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 3px;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.cd-lang-flag:hover {
  opacity: 0.9;
  border-color: rgba(247,164,27,0.5);
  transform: scale(1.1);
}

.cd-lang-flag--active {
  opacity: 1 !important;
  border-color: rgba(247,164,27,0.8);
  background: rgba(247,164,27,0.15);
}

.cd-lang-flag img {
  width: 22px !important;
  height: 15px !important;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  display: block;
}

/* Make titlebar a flex container to position flags */
.cd-window--logo .cd-window__titlebar {
  display: flex !important;
  align-items: center;
}

/* Hide the Joomla mod_languages module (we use custom flags in titlebar) */
.mod-languages {
  display: none !important;
}

/* === Floating Mascot Animation === */
@keyframes amigo-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

.com-content-article img[alt*="Maskottchen"] {
  animation: amigo-float 3s ease-in-out infinite;
}

/* === Sidebar Menu Styling (Amiga Workbench Style) === */
.cd-window__content .mod-menu,
.cd-sidebar--left .mod-menu {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cd-window__content .mod-menu li {
  margin: 0;
  padding: 0;
  width: 100%;
}

.cd-window__content .mod-menu li a {
  display: block;
  padding: 4px 8px;
  color: #d0d0d0;
  text-decoration: none !important;
  font-size: 0.92rem;
  border-bottom: 1px dotted rgba(255,255,255,0.2);
  transition: all 0.2s ease;
}

.cd-window__content .mod-menu li:last-child a {
  border-bottom: none;
}

.cd-window__content .mod-menu li a:hover,
.cd-window__content .mod-menu li a:focus {
  background: rgba(247,164,27,0.15);
  color: #f7a41b;
}

.cd-window__content .mod-menu li.active > a,
.cd-window__content .mod-menu li.current > a {
  background: rgba(247,164,27,0.08);
  color: #f7a41b;
  font-weight: 600;
}

/* === Mobile: Welcome Flex -> Column === */
@media (max-width: 768px) {
  .com-content-article > div[style*="display:flex"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  .com-content-article > div[style*="display:flex"] > div:first-child {
    width: 160px !important;
  }
  .com-content-article div[style*="position:absolute"][style*="border-right-color"] {
    display: none !important;
  }
}

/* === Pricing Cards: Mobile Stack === */
@media (max-width: 768px) {
  .com-content-article > div[style*="display:flex"][style*="flex-wrap:wrap"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  .com-content-article > div[style*="display:flex"][style*="flex-wrap:wrap"] > div {
    width: 100% !important;
    max-width: 350px !important;
  }
}

/* ============================================
   GLOBAL DARK THEME OVERRIDES
   ============================================ */

.com-content-article div[style*="background"] {
  background: rgba(255,255,255,0.05) !important;
  background-color: rgba(255,255,255,0.05) !important;
  background-image: none !important;
  color: #d0d0d0 !important;
}

.com-content-article div[style*="border-left"] {
  border-left-color: rgba(247,164,27,0.4) !important;
}

.com-content-article div[style*="border:"],
.com-content-article div[style*="border: "] {
  border-color: rgba(255,255,255,0.15) !important;
}

.com-content-article h2[style],
.com-content-article h3[style],
.com-content-article h4[style] {
  color: #f7a41b !important;
}

.com-content-article p[style*="color"],
.com-content-article em[style],
.com-content-article span[style*="color"] {
  color: #999 !important;
}

/* --- Form Controls --- */
.form-control, .form-select,
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="url"], input[type="number"],
textarea, select {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: #d0d0d0 !important;
  border-radius: 6px !important;
}

.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(247,164,27,0.5) !important;
  box-shadow: 0 0 8px rgba(247,164,27,0.15) !important;
  color: #e0e0e0 !important;
  outline: none !important;
}

.form-control::placeholder, input::placeholder, textarea::placeholder {
  color: rgba(255,255,255,0.35) !important;
}

.form-label, label { color: #d0d0d0 !important; }
.form-check-label { color: #bbb !important; }

/* --- Buttons --- */
.btn-primary, button[type="submit"], input[type="submit"] {
  background: linear-gradient(135deg, #f7a41b, #ff6b35) !important;
  border: none !important;
  color: #1a1a2e !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
}

.btn-primary:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: linear-gradient(135deg, #ff6b35, #f7a41b) !important;
  box-shadow: 0 4px 12px rgba(247,164,27,0.3) !important;
}

/* --- Cards --- */
.card, .card-body {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #d0d0d0 !important;
}

/* --- Login --- */
.mod-login .form-control {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: #d0d0d0 !important;
}
.mod-login label, .mod-login .form-check-label { color: #bbb !important; }
.mod-login .btn {
  background: linear-gradient(135deg, #f7a41b, #ff6b35) !important;
  border: none !important; color: #1a1a2e !important; font-weight: 600 !important;
}

/* --- AcyMailing --- */
.acym_module .acym_form, .acym_module .acym_module_form { background: transparent !important; color: #d0d0d0 !important; }
.acym_module input[type="text"], .acym_module input[type="email"] { background: rgba(255,255,255,0.08) !important; border: 1px solid rgba(255,255,255,0.2) !important; color: #d0d0d0 !important; }
.acym_module .btn, .acym_module input[type="submit"] { background: linear-gradient(135deg, #f7a41b, #ff6b35) !important; border: none !important; color: #1a1a2e !important; }

/* --- Contact --- */
.com-contact-contact .card, .com-contact-contact .card-body { background: transparent !important; border-color: rgba(255,255,255,0.1) !important; color: #d0d0d0 !important; }
.com-contact-contact h2, .com-contact-contact h3 { color: #f7a41b !important; }
.com-contact-contact p, .com-contact-contact address { color: #d0d0d0 !important; }
.com-contact-contact a { color: #44aaff !important; }

/* --- Article --- */
.com-content-article h1, .com-content-article h2, .com-content-article h3, .com-content-article h4 { color: #f7a41b !important; }
.com-content-article p, .com-content-article li { color: #d0d0d0; }
.com-content-article strong { color: #e0e0e0; }
.com-content-article a { color: #44aaff; }

.star { color: #f7a41b !important; }

/* === Hide Navigation Elements === */
ul.pager, ul.pagenav, .pagenav,
.com-content-article .article-footer-wrap,
.com-content-article nav[aria-label="Pagination"],
.com-content-article .pagination { display: none !important; }

.com-content-article .article-info, .com-content-article__info,
.com-content-article .com-content-article__info,
dl.article-info, .article-info.text-muted,
.com-content-article dd, .com-content-article dl { display: none !important; }
