/* ==========================================
   STUDIO PAGE
========================================== */

.studio-page{

    max-width:850px;

    margin:auto;

    padding:20px;

}

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

.page-header{

    margin-bottom:25px;

}

.page-header h1{

    font-size:2rem;

    margin-bottom:6px;

}

.page-header p{

    color:#666;

}

/* ==========================================
   SEARCH
========================================== */

.search-box{

    position:relative;

    margin-bottom:18px;

}

.search-box i{

    position:absolute;

    left:16px;

    top:50%;

    transform:translateY(-50%);

    color:#999;

}

.search-box input{

    width:100%;

    height:52px;

    padding:0 18px 0 46px;

    border:none;

    border-radius:16px;

    background:var(--surface);

    box-shadow:var(--shadow);

    font-size:16px;

    outline:none;

}

.search-box input:focus{

    outline:2px solid rgba(59,109,204,.25);

}

/* ==========================================
   SEARCH RESULTS
========================================== */

.search-results{

    display:none;

    margin-bottom:18px;

    background:var(--surface);

    border-radius:16px;

    box-shadow:var(--shadow);

    overflow:hidden;

}

.search-result{

    display:flex;

    align-items:center;

    gap:14px;

    padding:14px 18px;

    cursor:pointer;

    border-bottom:1px solid #ececec;

    transition:.15s;

}

.search-result:last-child{

    border-bottom:none;

}

.search-result:hover{

    background:#f7f8fb;

}

.search-result i{

    color:var(--primary);

    font-size:18px;

}

.search-info{

    flex:1;

}

.search-title{

    font-weight:600;

    margin-bottom:4px;

}

.search-preview{

    font-size:.85rem;

    color:#777;

    overflow:hidden;

    display:-webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

}

/* ==========================================
   NEW CARD
========================================== */

.new-card{

    height:62px;

    display:flex;

    justify-content:center;

    align-items:center;

    gap:12px;

    background:var(--primary);

    color:white;

    border-radius:18px;

    cursor:pointer;

    margin-bottom:28px;

    box-shadow:var(--shadow);

    transition:.2s;

}

.new-card:hover{

    transform:translateY(-2px);

}

.new-card i{

    font-size:20px;

}

.new-card span{

    font-weight:600;

}

/* ==========================================
   ELENCO
========================================== */

.studio-list{

    display:grid;

    gap:18px;

}

/* ==========================================
   CARD
========================================== */

.studio-card{

    background:var(--surface);

    border-radius:20px;

    padding:22px;

    box-shadow:var(--shadow);

}

.studio-head{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:15px;

    margin-bottom:15px;

}

.studio-head h2{

    font-size:1.2rem;

    margin:0;

    flex:1;

}

.edit-btn{

    width:42px;

    height:42px;

    border:none;

    border-radius:12px;

    background:#eef3ff;

    color:var(--primary);

    cursor:pointer;

    transition:.2s;

}

.edit-btn:hover{

    background:var(--primary);

    color:white;

}

.studio-text{

    color:#555;

    line-height:1.7;

    white-space:pre-line;

}

.studio-footer{

    margin-top:18px;

    padding-top:14px;

    border-top:1px solid #ececec;

    color:#888;

    font-size:.85rem;

    display:flex;

    align-items:center;

    gap:8px;

}

/*====================================
MODAL
====================================*/

.modal{

    position:fixed;
    inset:0;

    display:none;

    align-items:center;
    justify-content:center;

    padding:15px;

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

    z-index:9999;

}

.modal.show{

    display:flex;

}

.modal-content{

    width:100%;
    max-width:700px;

    max-height:calc(100vh - 90px);

    overflow:auto;

    background:var(--surface);

    border-radius:20px;

    box-shadow:var(--shadow);

    display:flex;
    flex-direction:column;

}

.modal-header{

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:20px 25px;

    border-bottom:1px solid #eee;

    position:sticky;
    top:0;

    background:var(--surface);

    z-index:2;

}

.modal-body{

    padding:25px;

    flex:1;

}

.modal-footer{

    padding:20px 25px;

    border-top:1px solid #eee;

    display:flex;
    justify-content:flex-end;
    gap:12px;

    position:sticky;
    bottom:0;

    background:var(--surface);

}

.modal textarea{

    min-height:280px;

    resize:vertical;

}

.close{

    cursor:pointer;
    font-size:28px;

}

/**** FORM GROUP **/
.form-group{

    margin-bottom:18px;

}

.form-group label{

    display:block;

    margin-bottom:6px;

    font-weight:600;

}

.form-group input,

.form-group textarea{

    width:100%;

    padding:14px;

    border:1px solid #ddd;

    border-radius:14px;

    font-size:15px;

    resize:vertical;

    background:white;

}

.form-group textarea{

    min-height:260px;

}

.modal-actions{

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:25px;

}

.btn-primary{

    background:var(--primary);

    color:white;

    border:none;

    border-radius:14px;

    padding:12px 20px;

    cursor:pointer;

}

.btn-secondary{

    background:#ececec;

    border:none;

    border-radius:14px;

    padding:12px 20px;

    cursor:pointer;

}

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

@media(max-width:700px){

    .studio-page{

        padding:18px;

    }

    .page-header h1{

        font-size:1.6rem;

    }

    .modal{

        align-items:flex-end;

        padding:0;

    }

    .modal-content{

        width:100%;

        max-width:none;

        border-radius:24px 24px 0 0;

        animation:slideUp .25s ease;

    }

    @keyframes slideUp{

        from{

            transform:translateY(100%);

        }

        to{

            transform:translateY(0);

        }

    }

}

.note.selected{

    border:2px solid var(--primary);

    box-shadow:0 0 0 4px rgba(59,109,204,.15);

}
.bottom-nav.hide{

    transform:translateY(100%);

    opacity:0;

    pointer-events:none;

    transition:.25s;

}