@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poiret+One&display=swap');

html, body {
    font-family: 'Poppins', sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.fancy {
    font-family: 'Poiret One', cursive;
    font-size: 26px;
    vertical-align: middle;
}
    .fancy::before {
        font-family: "Font Awesome 5 Pro";
        content: '\f105';
        display: inline-block;
        height: 29px;
        padding: 0px 15px;
    }
.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.pckManage {
    height: calc(100% - 62px) !important;
    padding: 0 !important;
    margin-top: 66px;
    overflow: auto;
    overflow-x: hidden;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }

    html, body, .main, app {
        height: auto !important;
        overflow: auto !important
    }

    .pdfViewer {
        margin-top:0 !important; 
        margin-bottom:15px !important; 
    }

    .loadingIcon {
        top: calc(50% - 80px) !important;
        right: calc(50% - 100px) !important;
    }

    .loadingwrapper {
        background-position: bottom 50px center !important;
        background-size: 80% !important;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}


/* ── Stamp Toolbar (PackageConfig / DocumentConfig) ───── */
.stamp-toolbar {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.stamp-toolbar .stamp-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background 0.15s ease;
}

.stamp-toolbar .stamp-btn:hover {
    background: #e5e7eb;
}

.stamp-toolbar .stamp-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.stamp-toolbar .stamp-btn:disabled:hover {
    background: transparent;
}

.stamp-toolbar .stamp-btn i {
    font-size: 22px;
    color: #4b5563;
}

.stamp-toolbar .stamp-label {
    display: none;
}

@media (min-width: 1600px) {
    .stamp-toolbar .stamp-label {
        display: inline;
    }
}

.pdf-loading-overlay {
    visibility: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: #f5f5f5;
    z-index: 10;
}

.pdf-loading-overlay img {
    height: 100px;
}

.pdf-loading-overlay p {
    margin-top: 12px;
    color: #888;
    font-size: 14px;
}

.e-pv-viewer-container{height:calc(100% - 85px) !important;}

.navbar {display:table !important;}
.navbar.sticky-top, .navbar.sticky-bottom {display:flex !important;}

.pull-right, .float-end{float:right;}

html, body, .main, app {
    height: 100%;
    overflow: hidden
}

.content {
}

.btn-group.special, .btn-group.special2 {
    display: flex;
    margin-top: 5px;
    margin-bottom: 5px;
}

.special .btn {
    flex: 1;
    margin-left: 1.5px !important;
}

    .special .btn:first-child {
        margin-left: 0 !important;
    }

.btn-blue {
    background-color: #1c6e8c !important;
    border-color: #1c6e8c !important;
    color: whitesmoke;
}

.btn-light {
    color: #212529;
    background-color: #e5e5e5;
    border-color: #e5e5e5;
}

.docbtn, .addbtn {
    padding: 12px 10px;
    font-size: 14px;
}
.loadingwrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,1);
    z-index: 999999999 !important;
    background-image:url('CareSignBrand2.png');
    background-position:bottom 25px left 15px !important;
    background-repeat:no-repeat;
}
.loadingIcon {
    position: fixed;
    bottom:0;
    right:0;
    z-index: 999999999 !important;
    text-align:center;
}

/* PDF viewer height: SfPdfViewer2 sets height via its Height="100%" prop.
   Stamp toolbar and skeleton loader use their own sizing. */

.btn-primary.focus, .btn-primary:focus, .btn-light.focus, .btn-light:focus, .btn-info.focus, .btn-info:focus, .btn-secondary.focus, .btn-secondary:focus {
    box-shadow: none !important;
}

.btn.btn-secondary.dropdown-toggle.btn-block {
    text-align: left;
}

    .btn.btn-secondary.dropdown-toggle.btn-block::after {
        float: right;
        margin-top: 10px;
    }

.dropdown-menu.dropdown-menu-start.show {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu.dropdown-menu-start.show .dropdown-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-group.btn-block {
    width: 100%;
}

.ui-state-highlight {
    height: 1.5em;
    line-height: 1.2em;
}

.btn-group.special2 {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
    align-items: stretch;
}

.btn-group.special2 .docbtn {
    flex: 1;
    min-width: 0;
}

.btn-group.special2 .docbtn.btn-primary {
    border-left: 4px solid #0d47a1;
}

.sortableDocuments {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.template-item:hover {
    background: #e2e6ea;
}

.template-item.active {
    background: #1b6ec2;
    color: white;
    border-left: 4px solid #0d47a1;
}

.template-item.active .badge {
    background: rgba(255,255,255,0.25) !important;
}

.template-item-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-item-name {
    font-size: 14px;
    font-weight: 500;
}

.template-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.template-edit-btn {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
}

.template-item.active .template-edit-btn {
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.template-item.active .template-edit-btn:hover {
    background: rgba(255,255,255,0.15);
}

.dotdrag {
    width: 28px;
    height: 46px;
    flex-shrink: 0;
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
    padding: 4px;
    cursor: move;
    object-fit: contain;
    border-radius: 0.375rem 0 0 0.375rem;
}

.sigstyleRow {display:block; margin-bottom:10px}
    .sigstyleRow:hover {
        background-color: #F9F9F9;
        cursor: pointer;
        border-radius: 6px;
        box-shadow: 0 0 20px rgba(0,0,0,0.19), 0 0 6px rgba(0,0,0,0.23);
    }

.btn-primary.disabled, .btn-primary:disabled {
    color: #fff !important;
    background-color: #007bff !important;
    border-color: #007bff !important;
    opacity:1.0 !important;
}

.muted{
    font-size:smaller;
    color:rgba(0,0,0,0.7);
    display:block;
}

.delete {
    float: left;
    background-color: red !important;
    border-color: red !important;
}

.delete[disabled]{ opacity:0}

#canvas_container {
    width: 100%;
    height: 650px;
    overflow: auto;
    background: #333;
    text-align: center;
    border: solid 3px;
}

.loginwindow {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.65);
}

.loginwrap {
    width: 700px;
    position: fixed;
    background-color: white;
    top: 20%;
    left: calc(50% - 350px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.62), 0 1px 2px rgba(0,0,0,0.74);
    padding: 25px;
    text-align: center;
    border-radius: 3px;
}

    .loginwrap img {
        width: 80%;
        max-width: 400px;
        display: block;
        margin: 15px auto
    }

    .loginwrap input {
        display: block !important;
        width: 60%;
        margin: 15px auto
    }

.list-group-item-action {
    cursor: pointer;
}

.caresignoff, .caresignon {
    padding-left: 2.0em;
}

.caresignoff:before {
    content: "\f057"; /* FontAwesome Unicode */
    font-family: FontAwesome;
    display: inline-block;
    margin-left: -1.3em; /* same as padding-left set on li */
    width: 1.7em; /* same as padding-left set */
    color:red;
}


    .caresignon:before {
        content: "\f058"; /* FontAwesome Unicode */
        font-family: FontAwesome;
        display: inline-block;
        margin-left: -1.3em; /* same as padding-left set on li */
        width: 1.7em; /* same as padding-left set */
        color: green;
    }

    .jumbotron {padding:2.5rem !important; margin-bottom:1rem;}

    .box-title{
        font-size:12px;
    }
    
.busy {
    opacity: .6;
}

.components-reconnect-show, .components-reconnect-failed, .components-reconnect-rejected {
    display: none;
}

.e-toolbar .e-tbar-btn:hover,
.e-toolbar .e-tbar-btn:focus {
    border: 0;
    box-shadow: none;
}

/* ── Sign Flow Shared Navbar ────────────────────── */
.sign-navbar {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: none;
    box-sizing: border-box;
}

.sign-navbar-top {
    top: 0;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sign-navbar-bottom {
    bottom: 0;
    justify-content: space-between;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

.sign-navbar .sign-brand {
    position: absolute;
    left: 16px;
    height: 28px;
}

.sign-navbar .navbar-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.95);
}

/* ── Shared Skeleton Animation ──────────────────── */
@keyframes sign-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.sign-skeleton-bar {
    height: 12px;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: sign-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* ── Shared Verify / Thank You Styles ─────────── */
/* Used by ThankYou.razor, VerificationContainer.razor */

.verify-page {
    min-height: 100vh;
    background: #f5f5f5;
}

.verify-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    margin-top: 56px;
    padding: 24px;
}

.verify-card {
    max-width: 540px;
    width: 100%;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.verify-logo {
    width: 200px;
    max-width: 60%;
    margin-bottom: 24px;
}

.verify-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.verify-icon-success {
    color: #22c55e;
}

.verify-icon-info {
    color: #2563eb;
}

.verify-icon-waiting {
    color: #f59e0b;
}

.verify-heading {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.verify-message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.verify-close-btn {
    margin-top: 20px;
    padding: 10px 32px;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.verify-close-btn:hover {
    background: #4b5563;
}
