/* Side Panel */
#noted-panel, .wp-admin-styling #noted-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100%;
    max-height: 100vh;
    background-color: #fff;
    border-left: 1px solid #ccc;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 9999;
    padding: 20px;
    overflow-y: scroll;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: .875rem;
    color: rgb(51, 51, 51);
}

.has-visible-admin-bar #noted-panel {
    margin-top: 32px;
}

.noted-content h2, .wp-admin-styling .noted-content h2  {
    margin-top: 0;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: rgb(51, 51, 51);
}

/* Panel in "open" state slides into view */
#noted-panel.open {
    transform: translateX(0);
}

/* Style the admin bar button */
.noted-icon {
    cursor: pointer;
}

/* Styling for the notes form */
#noted-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: .875rem;
}

#noted-form input[type="text"],
#noted-form textarea, .wp-admin-styling #noted-form input[type="text"], .wp-admin-styling #noted-form textarea{
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}



#noted-form input[type="text"], .wp-admin-styling #noted-form input[type="text"]{
    font-weight: 700;
    font-size: .875rem;
}

.wp-admin-styling input[type="text"].edit-note-title, .wp-admin-styling .wp-admin-styling input[type="text"].edit-note-title {
    font-weight: 700;
    font-size: .875rem;
    border-radius: 4px;
    border-color: #ccc;
}

.edit-note-description, .wp-admin-styling .edit-note-description{
    font-size: .875rem;
    border-radius: 4px;
    border-color: #ccc;
}


/* Styling for the notes list */
#noted-list {
    margin-top: 24px;
}

.noted-note {
    padding: 12px;
    border: 1px solid #ccc;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: .875rem;
}

.noted-note-header {
    cursor: pointer;
    font-weight: bold;
    display: grid;
    grid-template-columns: 1fr;
    font-size: .875rem;
}

.noted-note-timestamp, .noted-note-username{
    color: #888;
    font-weight: 400; 
    font-size: .75rem;
}

.noted-note-username::before{
    content: 'Added By: ';
}

/* Accordion Animation for Note Descriptions */
:root {
    interpolate-size: allow-keywords;
}

.noted-note-description {
    overflow: hidden;
    block-size: 0;
    content-visibility: hidden;
    transition: block-size 0.25s ease, content-visibility 0.25s ease;
    transition-behavior: allow-discrete;
    font-size: .875rem;
}

.noted-note-description.open {
    block-size: auto; /* Open state height */
    content-visibility: visible;
    margin-top: 12px;
    font-size: .875rem;
    max-height: 320px;
    overflow-y: auto;
}

.noted-note-description p{
    margin-block: 0px;
    font-size: .875rem;
}


.noted-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 8px;
    transition: all .25s ease;
}

.noted-close-button:hover {
    color: rgb(51, 51, 51);
    background: transparent;
}

#noted-panel a {
    color: #0073aa;
    text-decoration: underline;
    text-decoration-color:#0073aa;
}

#noted-panel a:hover {
    color: #005177;
    text-decoration: underline;
    text-decoration-color:#005177;
}

.noted-note-meta{
    margin-top: 16px;
    padding-top: 6px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    font-weight: 400; 
    font-size: .75rem;
}

.edit-actions{
    margin-top: 6px
}

.edit-actions button{
    display: inline-block;
    padding: 8px 12px;
    background-color: #d6d6d6;
    color: rgb(51, 51, 51);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: .75rem;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.edit-actions button:hover{
    background-color: rgb(51, 51, 51);
    color: white;
}

#noted-add{
    display: inline-block;
    padding: 8px 12px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    font-size: 1em;
}

#noted-add:hover{
    background-color:#005177;
}


#noted-description, .edit-note-description {
    min-height: calc(4em + (3 * 1.5em))
}

.edit-note-description{
    min-height: 280px;
}


.noted-note-description ul,
.noted-note-description ol {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0.5em 0;
}

.noted-note-description ol {
    list-style-type: decimal;
}

.noted-note-description ul ul,
.noted-note-description ol ul {
    list-style-type: circle;
    margin: 0.3em 0;
}

.noted-note-description ul ul ul,
.noted-note-description ol ul ul {
    list-style-type: square;
}

.noted-note-description ol ol,
.noted-note-description ul ol {
    list-style-type: lower-alpha;
    margin: 0.3em 0;
}

.noted-note-description ol ol ol,
.noted-note-description ul ol ol {
    list-style-type: lower-roman;
}

.noted-note-description li {
    margin-bottom: 0.2em;
}

/* Base heading styles for notes */
.noted-note-description h1,
.noted-note-description h2,
.noted-note-description h3,
.noted-note-description h4,
.noted-note-description h5,
.noted-note-description h6 {
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 1.5em 0 0.5em;
    color: rgb(51, 51, 51);
    font-weight: 600;
    line-height: 1.2;
}

/* Individual heading sizes */
.noted-note-description h1 {
    font-size: 2em;
    margin-top: 0.67em;
}

.noted-note-description h2 {
    font-size: 1.5em;
    margin-top: 0.83em;
}

.noted-note-description h3 {
    font-size: 1.17em;
    margin-top: 1em;
}

.noted-note-description h4 {
    font-size: 1em;
    margin-top: 1.33em;
}

.noted-note-description h5 {
    font-size: 0.83em;
    margin-top: 1.67em;
}

.noted-note-description h6 {
    font-size: 0.67em;
    margin-top: 2.33em;
}

/* First heading in the note should have no top margin */
.noted-note-description > h1:first-child,
.noted-note-description > h2:first-child,
.noted-note-description > h3:first-child,
.noted-note-description > h4:first-child,
.noted-note-description > h5:first-child,
.noted-note-description > h6:first-child {
    margin-top: 0;
}

/* Tooltip */ 
/* Info Icon Styling */
.info-icon {
    display: inline;
    font-size: 1em;
    color: #888;
    position: relative;
    cursor: pointer;
}

/* Tooltip styling on hover */
.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -2.5em;
    left: 50%;
    transform: translatex(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: normal;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-align: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    width: 400px;
    max-width: 25ch;
}

.info-icon::after {
    content: '';
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

}
