/* YCW interface alignment patch | 2026-10-08
   Specific fixes only; original WHMCS actions, form IDs and handlers are unchanged. */

/* Context panel header: keep the minimise icon on the same row. */
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-heading {
    padding: 14px 16px !important;
}
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-heading .panel-title {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0;
    min-height: 32px;
    margin: 0 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: left;
}
body.ycw-portal .whm-sidebar .ycw-context-heading-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
body.ycw-portal .whm-sidebar .ycw-context-heading-label {
    display: block;
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: break-word;
}
body.ycw-portal .whm-sidebar .panel-title .wdes-sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    line-height: 1 !important;
}
body.ycw-portal .whm-sidebar .panel-title .panel-minimise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: 0 0 0 auto !important;
    float: none !important;
    color: #758298 !important;
    cursor: pointer;
    line-height: 1 !important;
    border-radius: 8px;
}
body.ycw-portal .whm-sidebar .panel-title .panel-minimise:hover {
    color: #ff5900 !important;
    background: #fff1e9;
}
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-body {
    display: block;
    padding: 14px 16px !important;
    color: #60708b !important;
    background: #fff !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    overflow-wrap: anywhere;
}
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-body:empty { display: none; }
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-body p:last-child,
body.ycw-portal .whm-sidebar .panel-sidebar > .panel-body div:last-child { margin-bottom: 0; }

/* Logged-in home panel header: title left, action right. */
body.ycw-portal .client-home-panels .ycw-home-panel-heading,
body.ycw-portal .wdes-clientarea-panel-block .ycw-home-panel-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px !important;
    min-width: 0;
    min-height: 34px;
    line-height: 1.4 !important;
}
body.ycw-portal .ycw-home-panel-heading-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 190px;
}
body.ycw-portal .ycw-home-panel-heading-label > i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    color: #ff5900 !important;
    background: #fff1e9;
    border-radius: 10px;
    line-height: 1 !important;
}
body.ycw-portal .ycw-home-panel-heading-text {
    min-width: 0;
    overflow-wrap: break-word;
    font-size: 13px !important;
    line-height: 1.4;
}
body.ycw-portal .ycw-home-panel-heading-action {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}
body.ycw-portal .ycw-home-panel-heading-action .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-height: 36px;
    padding: 8px 12px !important;
    color: #24344d !important;
    background: #fff !important;
    border: 1px solid #e0e5ed !important;
    border-radius: 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: center;
    white-space: normal;
}
body.ycw-portal .ycw-home-panel-heading-action .btn > i {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    background: transparent !important;
    line-height: 1 !important;
    font-size: 12px !important;
    width: auto !important;
    height: auto !important;
}
body.ycw-portal .ycw-home-panel-heading-action .btn:hover {
    color: #df4e00 !important;
    background: #fff5ef !important;
    border-color: #ffcfb4 !important;
}

/* Home news: remove legacy quote bar and restore hierarchy. */
body.ycw-portal.template-homepage .wdes-announcement-hp { padding: 20px 24px !important; }
body.ycw-portal.template-homepage .wdes-announcement-hp > .row { margin: 0 !important; }
body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single {
    float: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0 0 12px !important;
    font-size: 15px !important;
    line-height: 1.5;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 .label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 30px;
    margin: 0 !important;
    padding: 5px 12px !important;
    color: #df4e00 !important;
    background: #fff1e9 !important;
    border: 1px solid #ffdcc9;
    border-radius: 9px !important;
    font-size: 11.5px !important;
    line-height: 1.25;
    white-space: nowrap;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 a {
    min-width: 0;
    color: #0d1b2f !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.45;
    overflow-wrap: anywhere;
    text-decoration: none !important;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 a:hover {
    color: #e14e00 !important;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .ycw-news-excerpt {
    margin: 0 !important;
    padding: 14px 16px !important;
    color: #65738a !important;
    background: #f8fafc !important;
    border: 1px solid #edf1f5 !important;
    border-left: 0 !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
}
body.ycw-portal.template-homepage .wdes-announcement-hp .ycw-news-excerpt p {
    margin: 0 !important;
    color: inherit !important;
    font: inherit !important;
    line-height: inherit !important;
}

/* Consistent interaction geometry, scoped to Digit client-area buttons. */
body.ycw-portal .main-content a.btn,
body.ycw-portal .main-content button.btn,
body.ycw-portal .wdes-content a.btn,
body.ycw-portal .wdes-content button.btn,
body.ycw-portal .whm-sidebar a.btn,
body.ycw-portal .whm-sidebar button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    vertical-align: middle;
    border-radius: 10px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: center;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
body.ycw-portal .main-content .btn-xs,
body.ycw-portal .wdes-content .btn-xs {
    min-height: 34px;
    padding: 7px 11px !important;
    font-size: 11.5px !important;
}
body.ycw-portal .main-content .btn-sm,
body.ycw-portal .wdes-content .btn-sm { min-height: 38px; padding: 9px 13px !important; }
body.ycw-portal .wdes-content .btn-primary:hover,
body.ycw-portal .wdes-content .btn-success:hover,
body.ycw-portal .wdes-content .btn-info:hover {
    color: #fff !important;
    background: #db4d00 !important;
    border-color: #db4d00 !important;
}
body.ycw-portal .wdes-content .btn-default:hover,
body.ycw-portal .whm-sidebar .btn-default:hover {
    color: #df4e00 !important;
    background: #fff5ef !important;
    border-color: #ffd1b8 !important;
}
body.ycw-portal .wdes-content .btn:focus-visible,
body.ycw-portal .whm-sidebar .btn:focus-visible,
body.ycw-portal .whm-sidebar .panel-minimise:focus-visible,
body.ycw-portal .wdes-content a:focus-visible {
    outline: 2px solid #ff5900 !important;
    outline-offset: 2px !important;
}
body.ycw-portal .wdes-content .btn:disabled,
body.ycw-portal .wdes-content .btn.disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 767px) {
    body.ycw-portal .whm-sidebar .panel-sidebar > .panel-heading { padding: 12px 14px !important; }
    body.ycw-portal .whm-sidebar .panel-sidebar > .panel-body { padding: 14px !important; }
    body.ycw-portal .client-home-panels .panel-heading,
    body.ycw-portal .wdes-clientarea-panel-block > .panel-heading { padding: 12px 14px !important; }
    body.ycw-portal .ycw-home-panel-heading-label { flex-basis: 140px; }
    body.ycw-portal.template-homepage .wdes-announcement-hp { padding: 16px !important; }
    body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 { align-items: flex-start; }
    body.ycw-portal.template-homepage .wdes-announcement-hp .announcement-single h3 a { font-size: 14px !important; }
    body.ycw-portal.template-homepage .wdes-announcement-hp .ycw-news-excerpt { padding: 12px 14px !important; }
}
@media (max-width: 420px) {
    body.ycw-portal .ycw-home-panel-heading-label { flex: 1 1 100%; }
    body.ycw-portal .ycw-home-panel-heading-action { margin: 2px 0 0 auto; }
}
