/* ===========
   GENERAL
=========== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,sans-serif;
}

body{
    background:#e8e8ed;
    height:100vh;
    overflow:hidden;
}

/* ===========
BACKGROUND
=========== */

.background{
    width:100%;
    height:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:40px;
}

/* ===========
MAIN WINDOW
=========== */

.agreement-window{

    width:900px;
    max-width:95%;

    height:720px;

    background:#ffffff;

    border-radius:18px;

    box-shadow:
        0 18px 45px rgba(0,0,0,.15);

    display:flex;
    flex-direction:column;

    overflow:hidden;
}

/* ===========
HEADER
=========== */

.window-header{

    padding:30px;

    border-bottom:1px solid #ddd;

    background:#fafafa;
}

.window-title{

    font-size:30px;

    font-weight:700;

    color:#1d1d1f;

    margin-bottom:8px;
}

.window-subtitle{

    color:#666;

    font-size:15px;
}

/* ===========
SCROLL AREA
=========== */

.agreement-box{

    flex:1;

    overflow-y:auto;

    padding:40px;

    line-height:1.9;

    color:#333;
}

.agreement-box h2{

    margin-bottom:25px;

    font-size:28px;

    color:#111;
}

.agreement-box p{

    margin-bottom:22px;

    font-size:17px;
}

/* ===========
SCROLL MESSAGE
=========== */

.scroll-message{

    padding:18px;

    text-align:center;

    background:#fafafa;

    border-top:1px solid #ddd;

    color:#777;

    font-size:14px;
}

/* ===========
BUTTON AREA
=========== */

.button-area{

    display:flex;

    justify-content:flex-end;

    gap:15px;

    padding:25px;

    border-top:1px solid #ddd;

    background:#fafafa;
}

button{

    border:none;

    border-radius:12px;

    cursor:pointer;

    transition:.25s;

    font-size:16px;

    padding:14px 28px;

    font-weight:600;
}

button:disabled{

    opacity:.45;

    cursor:not-allowed;
}

/* Agree */

.primary{

    background:#0071e3;

    color:white;
}

.primary:hover:not(:disabled){

    background:#0063cb;
}

/* Deny */

.secondary{

    background:#f2f2f2;

    color:#111;
}

.secondary:hover:not(:disabled){

    background:#dddddd;
}

/* ===========
OVERLAYS
=========== */

.signature-overlay,
.complete-overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:999;
}

.hidden{

    display:none;
}

/* ===========
SIGNATURE WINDOW
=========== */

.signature-window{

    background:white;

    width:800px;

    max-width:95%;

    border-radius:18px;

    padding:35px;

    text-align:center;

    box-shadow:0 20px 60px rgba(0,0,0,.25);
}

.signature-window h2{

    font-size:28px;

    margin-bottom:10px;
}

.signature-window p{

    margin:8px 0;

    color:#444;
}

/* ===========
CANVAS
=========== */

canvas{

    margin:30px 0;

    border:2px solid #cfcfcf;

    border-radius:12px;

    width:100%;

    max-width:700px;

    background:white;

    touch-action:none;
}

/* ===========
SIGN BUTTONS
=========== */

.signature-buttons{

    display:flex;

    justify-content:center;

    gap:20px;
}

/* ===========
COMPLETE WINDOW
=========== */

.complete-window{

    width:520px;

    max-width:90%;

    background:white;

    padding:45px;

    border-radius:18px;

    text-align:center;

    box-shadow:0 20px 60px rgba(0,0,0,.25);
}

.complete-window h2{

    font-size:34px;

    margin-bottom:20px;
}

.complete-window p{

    margin-top:14px;

    font-size:17px;

    color:#444;
}

/* ===========
SCROLLBAR
=========== */

.agreement-box::-webkit-scrollbar{

    width:10px;
}

.agreement-box::-webkit-scrollbar-thumb{

    background:#c7c7c7;

    border-radius:20px;
}

.agreement-box::-webkit-scrollbar-track{

    background:#f3f3f3;
}

/* ===========
MOBILE
=========== */

@media (max-width:768px){

.agreement-window{

    width:min(900px,95vw);

    height:min(92vh,900px);

    background:#fff;

    border-radius:18px;

    display:flex;

    flex-direction:column;

    overflow:hidden;

    box-shadow:0 18px 45px rgba(0,0,0,.15);
}

.window-title{

    font-size:24px;
}

.agreement-box{

    padding:25px;
}

.button-area{

    flex-direction:column;
}

button{

    width:100%;
}

.signature-buttons{

    flex-direction:column;
}

}