/* Webcore Panel-aligned dashboard skin.
 * Uses the same visual tokens and geometry as the Webcore Panel admin theme.
 * Loaded after webcore-clientarea.css while the dashboard redesign is stabilised.
 */

/* Shared client-area surface. This replaces the old fixed pseudo-element
   backgrounds used by individual pages, so there is no artificial 100px top
   inset and every redesigned page inherits the same Panel background. */
body.template_2019 {
    background: #f5f6f7;
}

.webcore-dashboard::before,
body.template_2019:has(.section-account-service)::before {
    display: none !important;
    content: none !important;
}

.webcore-dashboard {
    --wc-charcoal: #2d3130;
    --wc-charcoal-deep: #282c2b;
    --wc-sidebar: #303433;
    --wc-blue: #0b82df;
    --wc-blue-hover: #0874c8;
    --wc-orange: #ff5a1f;
    --wc-green: #08aa83;
    --wc-bg: #f5f6f7;
    --wc-border: #dfe3e6;
    --wc-card-border: #d9dddf;
    --wc-text: #3f4954;
    --wc-muted: #6e7882;
    --wc-white: #fff;
    --wc-danger: #d94841;

    max-width: none;
    margin: 0;
    color: var(--wc-text);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
}

/* With the shared surface in place, no negative top-position compensation is
   required on the dashboard. */
.section-dashboard.webcore-dashboard {
    margin-top: 0;
}

.webcore-dashboard-heading {
    margin: 0 0 34px;
    align-items: center !important;
}

.webcore-dashboard-heading h1 {
    margin: 0 0 7px !important;
    color: #404b54;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 300;
}

.webcore-eyebrow {
    display: none;
}

.webcore-lead {
    margin: 0;
    color: var(--wc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.webcore-order-button,
.webcore-dashboard .btn,
.webcore-dashboard .btn-primary,
.webcore-dashboard .btn-secondary {
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 3px !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

.webcore-dashboard .btn-primary {
    color: #fff !important;
    background: var(--wc-blue) !important;
    border: 1px solid var(--wc-blue) !important;
}

.webcore-dashboard .btn-primary:hover,
.webcore-dashboard .btn-primary:focus,
.webcore-dashboard .btn-primary:active {
    color: #fff !important;
    background: var(--wc-blue-hover) !important;
    border-color: var(--wc-blue-hover) !important;
}

.webcore-dashboard .btn-outline-secondary,
.webcore-dashboard .btn-secondary {
    color: #39444d !important;
    background: #edf0f2 !important;
    border: 1px solid #d3d8dc !important;
}

.webcore-dashboard .btn-outline-secondary:hover,
.webcore-dashboard .btn-secondary:hover {
    color: #39444d !important;
    background: #e2e6e9 !important;
    border-color: #c8ced2 !important;
}

.webcore-dashboard .btn-link {
    min-height: auto;
    padding: 8px 6px;
    color: var(--wc-blue) !important;
    background: transparent !important;
    border: 0 !important;
    font-weight: 500;
}

/* Section headings match panel section-title/help hierarchy. */
.webcore-section-heading {
    margin: 0 0 12px;
    align-items: flex-end !important;
}

.webcore-section-heading h3 {
    margin: 0 0 4px !important;
    color: #303940;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.webcore-section-heading p {
    color: var(--wc-muted) !important;
    font-size: 13px;
}

.webcore-text-link {
    color: var(--wc-blue) !important;
    font-size: 13px;
    font-weight: 500;
}

/* Service cards */
.webcore-service-grid {
    margin-right: -8px;
    margin-left: -8px;
}

.webcore-service-grid > [class*=col-] {
    padding-right: 8px;
    padding-left: 8px;
}

/* webcore-clientarea.css contains an older incarnation of this component.
   Fully reset its geometry here so the Panel card is the sole source of truth. */
.webcore-dashboard .webcore-service-card,
.webcore-dashboard .webcore-service-card-primary {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    background: var(--wc-white);
    border: 1px solid var(--wc-card-border);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    transition: border-color .12s ease, box-shadow .12s ease;
}

/* Remove the legacy left accent stripe from the old card implementation. */
.webcore-dashboard .webcore-service-card::before,
.webcore-dashboard .webcore-service-card-primary::before {
    display: none !important;
    content: none !important;
}

/* Primary WordPress card keeps the Panel blue top accent. Higher specificity
   is intentional so it wins over the reset border shorthand above. */
.webcore-dashboard .webcore-service-card.webcore-service-card-primary {
    border-top: 3px solid var(--wc-blue) !important;
}

.webcore-dashboard .webcore-service-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.webcore-service-card:hover {
    border-color: #cbd1d5;
    box-shadow: 0 2px 5px rgba(0,0,0,.055);
    transform: none;
}

.webcore-service-card-body {
    padding: 20px 20px 4px;
}

.webcore-service-icon {
    width: 42px;
    height: 42px;
    color: #59646d;
    background: #f5f7f8;
    border: 1px solid #dce1e4;
    border-radius: 50%;
}

.webcore-service-card-primary .webcore-service-icon {
    color: #414141;
    background: #fff;
    border: 0;
    box-shadow: none;
}

.webcore-service-icon .material-icons {
    font-size: 20px;
}

.webcore-wordpress-mark {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: #414141;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -1px;
}

.webcore-service-type {
    margin-bottom: 5px;
    color: var(--wc-muted);
    font-size: 11px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.webcore-service-title {
    margin: 0;
    color: #313a42;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 300;
}

.webcore-service-plan {
    margin-top: 5px;
    color: var(--wc-muted);
    font-size: 13px;
}

.webcore-service-meta {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #e4e7e9;
}

.webcore-meta-label {
    margin-bottom: 4px;
    color: var(--wc-muted);
    font-size: 11px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.webcore-service-meta strong {
    color: #303940;
    font-size: 13px;
    font-weight: 600;
}

.webcore-service-actions {
    min-height: 62px;
    padding: 11px 20px;
    gap: 10px;
    background: #fafbfb;
    border-top: 1px solid #e5e8ea;
}

.webcore-dashboard .webcore-service-actions {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
}

.webcore-primary-action {
    min-height: 38px;
}

.webcore-dashboard .badge {
    padding: 4px 7px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 600;
    text-transform: uppercase;
}

.webcore-dashboard .badge-Active,
.webcore-dashboard .badge-Paid,
.webcore-dashboard .badge-Open,
.webcore-dashboard .badge-Opened,
.webcore-dashboard .badge-Answered {
    color: #fff;
    background: var(--wc-green);
}

.webcore-dashboard .badge-Unpaid,
.webcore-dashboard .badge-Terminated,
.webcore-dashboard .badge-Expired {
    color: #fff;
    background: var(--wc-danger);
}

/* Domains */
.webcore-domain-strip {
    margin-bottom: 34px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--wc-card-border);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}

.webcore-domain-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 11px 15px;
    color: #303940;
    border-bottom: 1px solid #edf0f2;
    text-decoration: none !important;
}

.webcore-domain-item:last-child {
    border-bottom: 0;
}

.webcore-domain-item:hover {
    color: #303940;
    background: #fafbfb;
    text-decoration: none !important;
}

.webcore-domain-item > span:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.webcore-domain-item strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webcore-domain-item small {
    margin-top: 2px;
    color: var(--wc-muted);
    font-size: 11px;
}

.webcore-domain-item > .material-icons {
    color: #8a949c;
    font-size: 18px;
}

/* HostBill ticket/invoice blocks restyled as Webcore Panel cards. */
.webcore-dashboard .info-box {
    margin-top: 0;
    margin-bottom: 24px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--wc-card-border);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}

.webcore-dashboard .info-box > .d-flex:first-child {
    min-height: 54px;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #e5e8ea;
}

.webcore-dashboard .info-box h3 {
    margin: 0;
    color: #303940;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
    text-transform: uppercase;
}

.webcore-dashboard .info-box .info-box-items {
    margin: 0;
    padding: 0;
}

.webcore-dashboard .info-box .table {
    margin: 0;
    background: #fff;
}

.webcore-dashboard .info-box .table thead tr {
    background: #fafbfb;
}

.webcore-dashboard .info-box .table th {
    padding: 10px 15px;
    color: var(--wc-muted) !important;
    background: #fafbfb !important;
    border: 0 !important;
    border-bottom: 1px solid #edf0f2 !important;
    font-size: 11px;
    font-weight: 600;
    text-shadow: none;
}

.webcore-dashboard .info-box .table td {
    padding: 12px 15px;
    color: var(--wc-text);
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    font-size: 12px;
    vertical-align: middle;
}

.webcore-dashboard .info-box .table tbody tr:last-child td {
    border-bottom: 0;
}

.webcore-dashboard .info-box .table tbody tr:hover td {
    background: #fafbfb;
}

.webcore-dashboard .info-box .text-dark {
    color: #303940 !important;
}

.webcore-dashboard .info-box .text-secondary {
    color: var(--wc-muted) !important;
}

.webcore-dashboard .info-box .btn-view-all {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
}

/* Empty state */
.webcore-empty-state {
    margin-bottom: 30px;
    padding: 34px 20px;
    background: #fff;
    border: 1px solid var(--wc-card-border);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}

.webcore-empty-state h4 {
    color: #303940;
    font-size: 16px;
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .section-dashboard.webcore-dashboard {
        margin-top: 0;
    }

    .webcore-dashboard-heading {
        margin-bottom: 26px;
        align-items: stretch !important;
    }

    .webcore-dashboard-heading h1 {
        font-size: 25px;
    }

    .webcore-order-button {
        align-self: flex-start;
    }

    .webcore-service-card-body {
        padding: 17px 15px 3px;
    }

    .webcore-dashboard .webcore-service-actions {
        padding: 11px 15px;
        flex-direction: column;
        align-items: stretch;
    }

    .webcore-primary-action,
    .webcore-secondary-action {
        width: 100%;
    }

    .webcore-domain-item {
        grid-template-columns: minmax(0,1fr) auto;
    }

    .webcore-domain-item > .material-icons {
        display: none;
    }
}
