/* =========================================
   DFL Dashboard Styles
   Scope: Membership Account Template
   ========================================= */

.dfl-dashboard{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

.dfl-dashboard .dfl-dash-bottom{
  margin-top: 14px;
}

.dfl-dashboard .dfl-dash-top {
  padding: clamp(16px, 2vw, 24px);
}

.dfl-dashboard .dfl-dash-value + .dfl-dash-value{
  margin-top: 14px;
}

.dfl-dashboard .dfl-dash-value {
  padding: clamp(16px, 2vw, 24px);
}

.dfl-dashboard .dfl-dash-h2,
.dfl-dashboard .dfl-h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--dfl-dark, #1C1917);
}

.dfl-dashboard .dfl-dash-perks {
  margin: 0 0 16px;
  padding-left: 20px;
  line-height: 1.6;
}

.dfl-dashboard .dfl-dash-perks li {
  margin-bottom: 6px;
}

.dfl-dashboard .dfl-dash-cta {
  margin-bottom: 10px;
}

/* Membership Benefits card: tight vertical spacing to match Support card */
.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-h2,
.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-h2 {
  margin: 0;
}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-perks {
  margin: 0;
  padding-left: 20px;
}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-perks li {
  margin-bottom: 4px;
}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-cta {
  margin-left:10px;}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-muted {
  margin: 0;
  margin-left:10px;
}

.dfl-dashboard .dfl-dash-value:has(.dfl-dash-perks) .dfl-dash-badge {
  align-self: flex-start;
  padding: 8px 16px;
  width: fit-content;
}

.dfl-dashboard .dfl-dash-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--dfl-red, #E74C3C);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color .2s ease;
}

.dfl-dashboard .dfl-dash-primary:hover {
  background: var(--dfl-blue, #2980B9);
  color: #fff;
}

.dfl-dashboard .dfl-dash-more a {
  color: var(--dfl-blue, #2980B9);
  text-decoration: none;
  font-weight: 500;
}

.dfl-dashboard .dfl-dash-more a:hover {
  text-decoration: underline;
}

.dfl-dashboard .dfl-dash-empty {
  padding: 16px 0;
  font-size: 14px;
  color: rgba(0,0,0,.7);
}

/* ---------- IDENTITY BLOCK ---------- */

.dfl-dashboard .dfl-dash-ident{
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: start;
  column-gap: 18px;
}

.dfl-dashboard .dfl-dash-avatar{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 2px;
}

.dfl-dashboard .dfl-dash-avatar img{
  border-radius: 999px;
  display: block;
  border: 2px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.dfl-dashboard .dfl-avatar-input{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dfl-dashboard .dfl-avatar-form{
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.dfl-dashboard .dfl-avatar-btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
  color: var(--dfl-link, #2980B9);
  border: 1px solid rgba(0,0,0,.12);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.dfl-dashboard .dfl-avatar-btn:hover{
  transform: translateY(-1px);
  background: rgba(41,128,185,.08);
  border-color: rgba(41,128,185,.35);
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}

.dfl-dashboard .dfl-dash-title{
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--dfl-accent, #E74C3C);
}

.dfl-dashboard .dfl-dash-titleline{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px 0;
}

.dfl-dashboard .dfl-dash-head{
  margin-bottom: 12px;
}

.dfl-dashboard .dfl-dash-status{
  margin-top: 0;
  width: fit-content;
}

.dfl-dashboard .dfl-dash-divider{
  border-top: 1px solid rgba(0,0,0,.10);
  margin: 18px 0 18px;
}

.dfl-dashboard .dfl-dash-actions{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.dfl-dashboard .dfl-dash-actions .dfl-dash-btn,
.dfl-dashboard .dfl-dash-actions .dfl-btn {
  display: flex;
  justify-content: center;
  text-align: center;
}

.dfl-dashboard .dfl-dash-actions-break{
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(0,0,0,.05);
  margin: 6px 0 2px;
}

.dfl-dashboard .dfl-dash-posts{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dfl-dashboard .dfl-dash-post{
  border: 1px solid var(--dfl-card-bd, rgba(0,0,0,.12));
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dfl-dashboard .dfl-dash-post:hover{
  transform: translateY(-2px);
  border-color: rgba(231,76,60,.45);
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
}

.dfl-dashboard .dfl-dash-postlink{
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  color: inherit;
}

.dfl-dashboard .dfl-dash-posttitle{
  font-weight: 600;
  line-height: 1.2;
  color: var(--dfl-link, #2980B9);
}

.dfl-dashboard .dfl-dash-postlink:hover .dfl-dash-posttitle{
  color: var(--dfl-link, #2980B9);
}

.dfl-dashboard .dfl-dash-postmeta{
  margin-top: 6px;
  font-size: 12px;
  opacity: .7;
}

.dfl-dashboard .dfl-dash-more{
  margin-top: 10px;
  margin-bottom:15px;
}

.dfl-dashboard .dfl-dash-support{
  text-align: left;
  display: flex;
  justify-content: flex-start;
}

.dfl-dashboard .dfl-dash-support-inner{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dfl-dashboard .dfl-dash-support .dfl-dash-muted{
  margin: 0;
  max-width: 600px;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  opacity: 1;
  padding-left: 12px;
  border-left: 3px solid rgba(231,76,60,.35);
}

.dfl-dashboard .dfl-dash-support-cta{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.dfl-dashboard .dfl-dash-support-btn {
  width: fit-content;
  white-space: nowrap;
  max-width: 100%;
  min-height: 40px;
}

/* Tablet: 1024 */
@media (max-width: 1024px) {
  .dfl-dashboard {
    padding: 20px 0;
  }

  .dfl-dashboard .dfl-dash-title {
    font-size: clamp(22px, 3.6vw, 34px);
  }

  .dfl-dashboard .dfl-dash-top,
  .dfl-dashboard .dfl-dash-value {
    padding: clamp(14px, 2vw, 20px);
  }
}

/* Mobile: 768 – single column */
@media (max-width: 768px) {
  .dfl-dashboard {
    padding: 16px;
  }

  .dfl-dashboard .dfl-dash-ident {
    grid-template-columns: 92px 1fr;
    column-gap: 14px;
  }

  .dfl-dashboard .dfl-dash-title {
    font-size: clamp(20px, 4vw, 26px);
  }

  .dfl-dashboard .dfl-dash-titleline {
    gap: 8px;
  }

  .dfl-dashboard .dfl-dash-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dfl-dashboard .dfl-dash-actions .dfl-dash-btn,
  .dfl-dashboard .dfl-dash-actions .dfl-btn {
    width: 100%;
  }

  .dfl-dashboard .dfl-dash-posts {
    grid-template-columns: 1fr;
  }

  .dfl-dashboard .dfl-dash-actions-break {
    background: rgba(0,0,0,.04);
    margin: 10px 0 2px;
  }

  .dfl-dashboard .dfl-dash-top,
  .dfl-dashboard .dfl-dash-value {
    padding: 16px;
  }

  .dfl-dashboard .dfl-dash-support .dfl-dash-muted {
    max-width: 100%;
  }

  .dfl-dashboard .dfl-dash-support-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- CONTRIBUTION HISTORY (page-contribution-history.php) ---------- */

.dfl-dashboard .dfl-contrib-empty {
  margin: 12px 0;
  padding: 16px 0;
  color: var(--dfl-dark, #1C1917);
  font-size: 14px;
}

.dfl-dashboard .dfl-contrib-empty a {
  color: var(--dfl-blue, #2980B9);
  font-weight: 500;
  margin-left: 0.25em;
}

.dfl-dashboard .dfl-contrib-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

.dfl-dashboard .dfl-contrib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dfl-dashboard .dfl-contrib-table th,
.dfl-dashboard .dfl-contrib-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.dfl-dashboard .dfl-contrib-table th {
  font-weight: 600;
  color: var(--dfl-dark, #1C1917);
}

.dfl-dashboard .dfl-contrib-table tbody tr:hover {
  background: rgba(0,0,0,.02);
}

/* Membership Orders: "Back to Dashboard" button (replaces PMPro link via the_content filter) */
body.page-membership-orders .dfl-dash-btn.dfl-btn {
  margin-top: 14px;
  display: inline-flex;
}
