/* ==========================================================================
   PTU Dashboard Components

   Specificity context:
   - Divi prefixes rules with `.et-db #et-boc .et-l` (0-3-1 specificity).
   - BuddyBoss uses `.entry-content` compounds and priority-20 loading.
   - Our selectors are `.ptu-dashboard .ptu-*` (0-2-0), loaded at priority 30.

   Specificity alone cannot win against an ID selector without hardcoding
   Divi internals. Properties that conflict with Divi/BB use !important.
   Properties that have no known conflict (transitions, transforms, cursors)
   do not, to keep overridability for future custom CSS.
   ========================================================================== */


/* ==========================================================================
   Equal-Height Cards — Page-scoped Divi height chain fix

   DOM: .et_pb_row_inner.et_pb_equal_columns
          > .et_pb_column_inner
            > .et_pb_module.et_pb_code
              > .et_pb_code_inner
                > .ptu-dashboard
                  > .ptu-card

   Scoped to page-id-3685 (PTU Account dashboard) only.
   ========================================================================== */

/* Row: flex container with stretch, gap replaces margin gutters */
body.page-id-3685 .et_pb_row_inner.et_pb_equal_columns {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 20px !important;
}

/* Column: neutralize Divi margin gutters, let flex gap handle spacing */
body.page-id-3685 .et_pb_row_inner.et_pb_equal_columns > .et_pb_column_inner {
    display: flex !important;
    flex-direction: column !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1 1 0% !important;
}

/* Module: pass height through */
body.page-id-3685 .et_pb_column_inner > .et_pb_module.et_pb_code {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* Code inner: pass height through */
body.page-id-3685 .et_pb_module.et_pb_code > .et_pb_code_inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* PTU dashboard wrapper */
.ptu-dashboard {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* Card stretches to fill dashboard wrapper */
.ptu-dashboard > .ptu-card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* Body absorbs extra space — keeps header top, footer bottom */
.ptu-dashboard > .ptu-card > .ptu-card__body {
    flex: 1 1 auto !important;
}


/* ==========================================================================
   Scope Resets
   Neutralize BuddyBoss generic element rules (h1-h6, p, ul, table, etc.)
   and Divi inherited text styling. Only applies inside .ptu-dashboard.
   ========================================================================== */

.ptu-dashboard h3,
.ptu-dashboard h4,
.ptu-dashboard h5,
.ptu-dashboard p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.ptu-dashboard ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ptu-dashboard li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ptu-dashboard a {
    color: #2563eb !important;
    text-decoration: none !important;
}

.ptu-dashboard a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.ptu-dashboard strong {
    font-weight: 700 !important;
}


/* ==========================================================================
   Summary Grid
   ========================================================================== */

.ptu-dashboard .ptu-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}


/* ==========================================================================
   Summary Card
   ========================================================================== */

.ptu-dashboard .ptu-summary-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 20px !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ptu-dashboard .ptu-summary-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

.ptu-dashboard .ptu-summary-card__label {
    font-size: 12px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
    margin-bottom: 6px !important;
}

.ptu-dashboard .ptu-summary-card__title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}

.ptu-dashboard .ptu-summary-card__meta {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    margin-top: 6px !important;
}

/* --- Summary Card Variants (border-left accents) --- */

.ptu-dashboard .ptu-summary-card--membership {
    border-left: 4px solid #22c55e !important;
}

.ptu-dashboard .ptu-summary-card--orders {
    border-left: 4px solid #3b82f6 !important;
}

.ptu-dashboard .ptu-summary-card--community-builder {
    border-left: 4px solid #f59e0b !important;
}


/* ==========================================================================
   Card (general — used by Overview, Quick Actions, Membership, etc.)
   ========================================================================== */

.ptu-dashboard .ptu-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
}

.ptu-dashboard .ptu-card__header {
    margin-bottom: 12px !important;
}

.ptu-dashboard .ptu-card__title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

.ptu-dashboard .ptu-card__body p {
    font-size: 14px !important;
    color: #4b5563 !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
}

.ptu-dashboard .ptu-card__body p:last-child {
    margin-bottom: 0 !important;
}

.ptu-dashboard .ptu-card__footer {
    margin-top: 16px !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.ptu-dashboard .ptu-btn {
    display: inline-block !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease;
    line-height: 1.4 !important;
}

.ptu-dashboard .ptu-btn:hover {
    text-decoration: none !important;
}

.ptu-dashboard .ptu-btn--primary {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
}

.ptu-dashboard .ptu-btn--primary:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

.ptu-dashboard .ptu-btn--secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.ptu-dashboard .ptu-btn--secondary:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}


/* ==========================================================================
   Tables (orders, payment history, membership details)
   BuddyBoss applies border, border-radius, and padding to all tables.
   ========================================================================== */

.ptu-dashboard table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 14px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.ptu-dashboard thead {
    background: transparent !important;
}

.ptu-dashboard th {
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #374151 !important;
    padding: 10px 12px !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid #e5e7eb !important;
    background: transparent !important;
}

.ptu-dashboard td {
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #4b5563 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: transparent !important;
}

.ptu-dashboard tr:last-child td {
    border-bottom: none !important;
}

.ptu-dashboard td a {
    font-weight: 600 !important;
}


/* ==========================================================================
   Quick Actions
   ========================================================================== */

.ptu-dashboard .ptu-quick-actions__list li {
    padding: 6px 0 !important;
}

.ptu-dashboard .ptu-quick-actions__list a {
    font-weight: 500 !important;
}


/* ==========================================================================
   Profile Nav
   ========================================================================== */

.ptu-dashboard .ptu-profile-nav__title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
    margin-bottom: 8px !important;
}

.ptu-dashboard .ptu-profile-nav__section {
    margin-bottom: 20px !important;
}

.ptu-dashboard .ptu-profile-nav__section:last-child {
    margin-bottom: 0 !important;
}

.ptu-dashboard .ptu-profile-nav__section li {
    padding: 4px 0 !important;
}


/* ==========================================================================
   Link Utility
   ========================================================================== */

.ptu-dashboard .ptu-link {
    display: inline-block !important;
    margin-top: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}


/* ==========================================================================
   Login Notice (renders outside .ptu-dashboard wrapper)
   ========================================================================== */

.ptu-login-notice {
    padding: 16px !important;
    background: #fef3c7 !important;
    border: 1px solid #fbbf24 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #92400e !important;
}


/* ==========================================================================
   Recommended Action Callout
   ========================================================================== */

.ptu-dashboard .ptu-dashboard-overview__action {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin-top: 16px !important;
}

.ptu-dashboard .ptu-dashboard-overview__action strong {
    display: block !important;
    font-size: 14px !important;
    color: #111827 !important;
    margin-bottom: 4px !important;
}

.ptu-dashboard .ptu-dashboard-overview__action p {
    font-size: 13px !important;
    color: #4b5563 !important;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .ptu-dashboard .ptu-summary-grid {
        grid-template-columns: 1fr !important;
    }
}
