.cd-create-signature-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: min(355px, 100vw);
    height: 100vh;
    background: #ffffff;
    box-shadow: 0px 0 7px rgba(15, 23, 42, 0.18);
    transform: translateX(-100%);
    transition: transform 220ms ease, box-shadow 220ms ease;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.cd-create-signature-panel.is-open {
    transform: translateX(0);
}

.cd-create-signature-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    font-family: Poppins;
}

.cd-create-signature-panel__heading {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 500;
    color: #0f172a;
    margin: 0;
}

.cd-create-signature-panel__icon-btn {
    appearance: none;
    border: 0;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .cd-create-signature-panel__icon-btn span {
      font-size: 26px;
    }

    #cd-signature-fullname {
        height: 40px;
        text-indent: 20px;
    }

.cd-create-signature-panel__tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 20px 0;
    font-family: Poppins;
}

.cd-create-signature-panel__tab {
    position: relative;
    padding: 3px 8px 5px;
    text-align: center;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: 'Poppins';
}

    .cd-create-signature-panel__tab.is-active {
        color: #0f172a;
        font-weight: 500;
        font-family: 'Poppins';
    }

.cd-create-signature-panel__tab.is-active:after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: #007ad9;
}

.cd-create-signature-panel__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 14px 16px 20px;
    font-family: Poppins;
}

.cd-create-signature-panel__section {
    display: none;
}

.cd-create-signature-panel__section.is-active {
    display: block;
}

.cd-create-signature-panel__preview,
.cd-create-signature-panel__dropzone {
    border: 1px solid #d8dee9;
    border-radius: 16px;
    background: #fff;
    min-height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-bottom: 18px;
    overflow: hidden;
}

.cd-create-signature-panel__preview-text {
    font-size: 35px;
    line-height: 1;
    font-family: "Handelson One", "Segoe Script", cursive;
    color: #111111;
    padding: 24px;
    text-align: center;
}

.cd-create-signature-panel__draw-placeholder {
    white-space: nowrap;
}

.cd-create-signature-panel__field {
    margin-bottom: 14px;
    
}

.cd-create-signature-panel__label {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins';
}

.cd-create-signature-panel__input,
.cd-create-signature-panel__select {
    width: 100%;
    height: 40px;
    border: 1px solid #d8dee9;
    border-radius: 14px;
    padding: 0 14px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

.cd-create-signature-panel__row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cd-create-signature-panel__color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    box-shadow: inset 0 0 0 2px #ffffff;
    cursor: pointer;
    flex: 0 0 auto;
}

.cd-create-signature-panel__color-swatch.is-selected {
    outline: 0;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #007ad9;
}

.cd-create-signature-panel__actions {
    display: flex;
    gap: 10px;
    margin: 2px 0 14px;
}

.cd-create-signature-panel__secondary-btn,
.cd-create-signature-panel__primary-btn {
    appearance: none;
    border-radius: 14px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #0f172a;
    flex: 1 1 0;
    width: 100%;
    margin-top: 10px;
}

.cd-create-signature-panel__primary-btn {
    border: 0;
    color: #ffffff;
    background: #007ad9;
}

.cd-create-signature-panel__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 14px;
}

.cd-create-signature-panel__switch {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    display: inline-block;
}

.cd-create-signature-panel__switch:before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 180ms ease;
}

.cd-create-signature-panel__toggle.is-on .cd-create-signature-panel__switch {
    background: #8b5cf6;
}

.cd-create-signature-panel__toggle.is-on .cd-create-signature-panel__switch:before {
    transform: translateX(18px);
}

.cd-create-signature-panel__slider-row {
    display: grid;
    grid-template-columns: 1fr 52px;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.cd-create-signature-panel__slider {
    width: 100%;
}

.cd-create-signature-panel__weight-badge {
    width: 48px;
    height: 40px;
    border: 1px solid #d8dee9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: #ffffff;
    font-weight: 500;
    text-indent: 14px;
}

.cd-create-signature-panel__dropzone {
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
    color: #64748b;
    text-align: center;
    padding: 24px;
}

.cd-create-signature-panel__dropzone.has-file {
    border-color: #007ad9;
    background: #f0f8ff;
}

.cd-create-signature-panel__upload-status {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    max-width: 270px;
    padding: 9px 11px;
    border: 1px solid #b7e1c1;
    border-radius: 10px;
    background: #f1fbf3;
    color: #166534;
    text-align: left;
    box-sizing: border-box;
}

.cd-create-signature-panel__upload-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.cd-create-signature-panel__upload-status-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.cd-create-signature-panel__upload-status-title {
    font-size: 13px;
}

.cd-create-signature-panel__upload-status-name {
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-create-signature-panel__dropzone-icon {
    width: 42px;
    height: 42px;
    color: #64748b;
}

.cd-create-signature-panel__mobile-upload {
    padding: 0 8px 8px;
    text-align: center;
    color: #0f172a;
}

.cd-create-signature-panel__mobile-upload-heading {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.cd-create-signature-panel__mobile-upload-copy {
    margin: 0 auto 12px;
    max-width: 270px;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
}

.cd-create-signature-panel__mobile-upload-qr {
    display: block;
    width: 128px;
    height: 128px;
    margin: 0 auto;
    object-fit: contain;
}

#cd-create-signature-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 1040;
}

#cd-create-signature-panel-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .cd-create-signature-panel {
        width: 100vw;
    }

    .cd-create-signature-panel__header {
        padding-inline: 16px;
    }

    .cd-create-signature-panel__body {
        padding-inline: 14px;
    }
}

@media (max-width: 767px) {
    .cd-create-signature-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100%;
        transform: translateY(100%);
        border: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.18);
        z-index: 10000002;
        padding-top: env(safe-area-inset-top, 0px);
        box-sizing: border-box;
    }

    .cd-create-signature-panel.is-open {
        transform: translateY(0);
    }

    #cd-create-signature-panel-overlay {
        z-index: 10000001;
    }

    .cd-create-signature-panel__body {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}
