/* Nexus Vault - Public Templates Styles */
.nv-pt-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    max_width: 100%;
}

/* --- Editor Toolbar --- */
.nv-pt-editor-toolbar {
    background: #f0f0f1;
    border: 1px solid #d0d0d0;
    border-bottom: none;
    padding: 5px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nv-format-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    min-width: 30px;
    color: #333;
    font-weight: 600;
}

.nv-format-btn:hover {
    background: #e5e5e5;
}

/* --- Rich Text Editor (Div) --- */
#nv-pt-note-input.nv-pt-rich-editor {
    border-radius: 0 0 6px 6px;
    margin-top: 0;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #d0d0d0;
    background-color: #fff;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    min-height: 100px; /* Starts big enough for ~4 lines */
    max-height: none;
    overflow-y: hidden; /* Hides scrollbar, lets div grow */
    display: block;
    line-height: 1.5;
    color: #333;
}

#nv-pt-note-input.nv-pt-rich-editor:focus {
    border-color: #d81b60;
    outline: none;
    box-shadow: 0 0 0 1px #d81b60;
    position: relative;
    z-index: 1;
}

/* Placeholder for contenteditable */
#nv-pt-note-input.nv-pt-rich-editor:empty:before {
    content: attr(placeholder);
    color: #aaa;
    display: block;
    cursor: text;
}

/* --- Loader --- */
.nv-pt-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #d81b60; /* Matched to Pink Button */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Upload Box (The Card Look) --- */
.nv-pt-upload-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Subtle shadow */
}

/* Center the title inside the upload box */
.nv-pt-upload-box h4 {
    text-align: center;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 25px;
    margin-top: 0;
}

/* Input Styles */
.nv-pt-upload-box input[type="text"],
.nv-pt-upload-box input[type="file"] {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px; /* Rounded corners */
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
}

.nv-pt-upload-box input[type="text"]:focus {
    border-color: #d81b60;
    outline: none;
    box-shadow: 0 0 0 1px #d81b60;
}

/* Pink Button Style */
.nv-pt-upload-box button[type="submit"] {
    display: block;
    margin: 10px auto 0 auto; /* Center button */
    background-color: #d81b60; /* Pink/Magenta */
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.nv-pt-upload-box button[type="submit"]:hover {
    background-color: #ad1457;
}

.nv-pt-upload-status {
    text-align: center;
    margin-top: 15px;
}

/* --- User List Items --- */
.nv-pt-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nv-pt-item:hover { box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

.nv-pt-item-main { flex: 1; min-width: 250px; }
.nv-pt-title { font-weight: 700; font-size: 1.1em; color: #1f2937; display: flex; align-items: center; gap: 10px; }

.nv-pt-notes-toggle { font-size: 0.85em; color: #d81b60; cursor: pointer; text-decoration: underline; margin-top: 5px; display: inline-block; }

/* Notes Content: Preserves multiline formatting */
.nv-pt-notes-content { 
    display: none; 
    background: #fff9c4; 
    padding: 10px; 
    margin-top: 10px; 
    border-radius: 4px; 
    font-size: 0.9em; 
    color: #444; 
    border-left: 3px solid #fbc02d;
    white-space: pre-wrap; /* This makes the magic happen for new lines */
}

/* Ensure images inside notes don't overflow if any */
.nv-pt-notes-content img { max-width: 100%; }

.nv-pt-actions { display: flex; gap: 10px; align-items: center; }

.nv-pt-btn-download {
    background-color: #d81b60;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.nv-pt-btn-download:hover { background-color: #ad1457; color: white; }

/* --- Admin List Specifics --- */
.nv-pt-admin-list .nv-pt-item { background: #f8fafc; }
.nv-pt-stats-badge { background: #e2e8f0; padding: 4px 8px; border-radius: 12px; font-size: 0.8em; color: #475569; margin-right: 10px; }
.nv-pt-btn-delete { color: #dc3545; background: none; border: 1px solid #dc3545; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.nv-pt-btn-delete:hover { background: #dc3545; color: white; }

/* --- Message Styling --- */
.nv-pt-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* --- Modal --- */
.nv-pt-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nv-pt-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.nv-pt-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.nv-pt-stat-row {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    font-size: 0.9em;
}
.nv-pt-stat-row span { font-weight: bold; }