/* ============================================================
   Phoca Download — Cassiopeia-dark Integration
   Dark theme + orange accent matching retroprojects-Branding
   ============================================================ */

/* ---------- Main category list view ---------- */
.pd-categories-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.pd-categories-view .pd-subcategory,
.pd-categories-view .pd-category {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  transition: transform .2s, border-color .2s, background .2s;
  position: relative;
}

.pd-categories-view .pd-subcategory:hover,
.pd-categories-view .pd-category:hover {
  transform: translateY(-3px);
  border-color: rgba(247,164,27,0.5);
  background: rgba(247,164,27,0.04);
}

/* Category headings */
.pd-categories-view .pd-subcategory h3,
.pd-categories-view .pd-subcategory h4,
.pd-categories-view .pd-category h3,
.pd-categories-view .pd-category h4 {
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  color: #fff;
}

.pd-categories-view .pd-subcategory h3 a,
.pd-categories-view .pd-subcategory h4 a,
.pd-categories-view .pd-category h3 a,
.pd-categories-view .pd-category h4 a {
  color: #fff;
  text-decoration: none;
}

.pd-categories-view .pd-subcategory h3 a:hover,
.pd-categories-view .pd-subcategory h4 a:hover,
.pd-categories-view .pd-category h3 a:hover,
.pd-categories-view .pd-category h4 a:hover {
  color: #f7a41b;
}

/* File/subcat count badges */
.pd-categories-view .pd-files-number,
.pd-categories-view .pd-categories-number {
  display: inline-block;
  background: rgba(247,164,27,0.15);
  color: #f7a41b;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 8px;
  margin-right: 6px;
  font-weight: 600;
}

.pd-categories-view .pd-sep-number {
  display: none;
}

.pd-categories-view .pd-cb {
  color: #aaa;
  font-size: .9rem;
  line-height: 1.4;
  margin-top: .4rem;
  display: block;
}

/* ---------- Single category view (file list) ---------- */
.ph-files,
.pd-files-view {
  margin-top: 1rem;
}

.ph-files .ph-item-box,
.pd-files-view .pd-file {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: .8rem;
  transition: border-color .2s;
}

.ph-files .ph-item-box:hover,
.pd-files-view .pd-file:hover {
  border-color: rgba(247,164,27,0.4);
}

.ph-files h3,
.pd-files-view h3 {
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 .3rem;
}

.ph-files h3 a,
.pd-files-view h3 a {
  color: #fff;
  text-decoration: none;
}

.ph-files h3 a:hover,
.pd-files-view h3 a:hover {
  color: #f7a41b;
}

/* Download button */
.pd-button-download,
.pd-download-button,
.ph-btn-download,
a.btn.btn-success {
  display: inline-block;
  background: linear-gradient(135deg, #f7a41b, #e8930a);
  color: #1a1a1a !important;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  font-size: .9rem;
  transition: transform .15s, box-shadow .15s;
}

.pd-button-download:hover,
.pd-download-button:hover,
.ph-btn-download:hover,
a.btn.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247,164,27,0.35);
  color: #1a1a1a !important;
}

/* Meta info: file size, date, hits */
.pd-file-meta,
.ph-file-meta,
.pd-files-view .pd-file-info {
  color: #888;
  font-size: .8rem;
  margin-top: .5rem;
}

.pd-file-meta span,
.ph-file-meta span {
  margin-right: 1.2rem;
}

/* ---------- Breadcrumb / Header ---------- */
.pd-pagination,
.pd-breadcrumb,
.com-phocadownload .breadcrumb {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: .5rem 1rem;
  margin-bottom: 1rem;
  color: #ccc;
  font-size: .85rem;
}

.com-phocadownload .breadcrumb a {
  color: #f7a41b;
  text-decoration: none;
}

/* ---------- Description box on category page ---------- */
.pd-category-desc,
.pd-categories-desc {
  background: rgba(247,164,27,0.05);
  border-left: 3px solid #f7a41b;
  padding: .8rem 1.2rem;
  margin-bottom: 1.5rem;
  color: #ddd;
  font-size: .95rem;
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
}

/* ---------- Access-restricted indicator ---------- */
.pd-noaccess,
.pd-restricted,
.pd-file.restricted {
  position: relative;
  border-color: rgba(247,164,27,0.4) !important;
}

.pd-noaccess::after,
.pd-restricted::after {
  content: "🔒 Mitglieder-Bereich";
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(247,164,27,0.15);
  color: #f7a41b;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---------- Form / search ---------- */
.com-phocadownload input[type="text"],
.com-phocadownload input[type="search"],
.com-phocadownload select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #fff;
  padding: 6px 10px;
}

.com-phocadownload input[type="text"]:focus,
.com-phocadownload input[type="search"]:focus,
.com-phocadownload select:focus {
  border-color: #f7a41b;
  outline: none;
}

/* ---------- Tables (fallback for older Phoca layouts) ---------- */
.pd-files-table,
.com-phocadownload table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.com-phocadownload table th {
  background: rgba(247,164,27,0.08);
  color: #f7a41b;
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(247,164,27,0.25);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.com-phocadownload table td {
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #ddd;
  font-size: .9rem;
}

.com-phocadownload table tr:hover td {
  background: rgba(247,164,27,0.03);
}

/* ---------- Page title heading ---------- */
.com-phocadownload h1.page-title,
.com-phocadownload .item-page > h1,
.com-phocadownload-categories h1,
.com-phocadownload-category h1 {
  color: #f7a41b;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(247,164,27,0.3);
  padding-bottom: .5rem;
}
