/* === POPUP === */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.popup-window {
    background: rgba(31,31,31,0.8);
    border-radius: 20px;
    padding: 30px;
    width: 360px;
    text-align: center;
    box-shadow: 0 10px 10px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.popup-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.popup-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.popup-btn.highlight {
    background: #272a31
}

/* === POPUP BACK BUTTON === */
.popup-back {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.15);
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: 0.2s;
    
}
.popup-back:hover {
    background: rgba(255,255,255,0.25);
}

/* === SIGNATURE OVERLAY === */
/* Overlay */
.signature-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* Window */
.signature-editor {
    background: rgba(31,31,31,0.95);
    border-radius: 22px;
    padding: 24px;
    width: 882px;
    max-width: 882px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    transform: scale(0.85);
    opacity: 0;
    transition: 0.3s ease;

    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 15px 40px rgba(0,0,0,0.45);
}

.signature-editor.active {
    opacity: 1;
    transform: scale(1);
}

/* Header */
.sig-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
}

.sig-close {
    background: rgba(255,255,255,0.12);
    border: none;
    padding: 6px 12px;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
}

/* Toolbar */
.sig-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    padding: 10px;
    border-radius: 12px;
}

.sig-toolbar button,
.sig-toolbar select,
.sig-toolbar input {
    background: rgba(255,255,255,0.14);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s ease;
}

.sig-toolbar button:hover,
.sig-toolbar select:hover,
.sig-toolbar input:hover {
    background: rgba(255,255,255,0.22);
}


.sig-toolbar select option {
    background: rgba(31,31,31,0.95);
    color: white;                     
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
}


.sig-body {
    display: flex;
    gap: 14px;
}

.sig-box {
    min-height: 190px;
    max-height: 190px;
    width: 100%;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;

    background: rgb(20, 20, 20);
    border-radius: 14px;
    padding: 14px;

    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: -0.1px;
}



.sig-preview {
    width: 260px;
    background: rgba(255,255,255,0.06);
    padding: 14px;
    border-radius: 12px;
}

.sig-preview-box {
    margin-top: 10px;
    min-height: 190px;
    background: rgba(0,0,0,0.18);
    border-radius: 10px;
    padding: 12px;
    color: white;
    font-size: 14px;
}


.save-signature-btn {
    background: #272a31;
    padding: 12px;
    border-radius: 12px;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
}
