.comments-wrapper {
    /**
     * By now you should be a bit familiar with CSS variables from the main site styles.
     * Rather than declare these on the root, we've set it to the more local comments, to help avoid any name clashes.
     * (https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) 
     */
    --comment-title-font: var(--bodyfont);
    --comment-text-font: var(--bodyfont);
    --comment-text-color: #222;
    /* bg colour of the inputs */
    --input-bg-color: white;
    --button-color: var(--themeblue);
    --button-color-hover: var(--themegreen);
    --button-text-color: white;
    --author-badge-color: #797979;

}

/**
   * This class will hide something visually on the page, but leave it for screen readers to read. We use it to visually hide the form labels.
   */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.visually-hidden:not(caption),
.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) {
    position: absolute !important;
}

/* the container that holds the form and comments together */
.comments-wrapper {
    padding: 1% 3% 3%;
    margin: 0 auto;
}

/* Form general */
#commentsForm {
    height: 100%;
    font-family: var(--comment-text-font);
    font-size: 16px;
    color: var(--comment-text-color);
    width: 100%;
    margin-bottom: 2rem;
    border-bottom: 1px solid #cacaca;
    padding-bottom: 3rem;
}

.comment-reply-info:hover {
    cursor: pointer;
}

/* Submit button */
#buttoncontainer {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
}

#commentsForm button {
    justify-self: right;
    padding: 0.7rem;
    font-family: var(--comment-title-font);
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--button-text-color);
    background-color: var(--button-color);
    cursor: pointer;
    outline: none;
    border: none;
    border-radius: 5px;
    width: 200px;
}

#commentsForm button:hover {
    background-color: var(--button-color-hover);
}

#commentsForm button:disabled {
    opacity: 60%;
}

/* Inputs */
#commentsForm input,
#commentsForm textarea {
    border: none;
    border-radius: 5px;
    background:var(--input-bg-color);
    margin-bottom: 0.5rem;
    
    border: 2px solid black;
}

#commentName{
    width: 250px;
    padding: 5px 10px;
}

#comment-comment {
    min-width: 100%;
    padding: 10px 10px;
}

#commentsForm textarea {
    min-height: 100px;
    resize: vertical;
}

.textarea-container {
    position: relative;

}


/* emoji button 
.emoji-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 2rem;
    width: 25px;
    height:25px;
    line-height: 0.75;
    transition: color 0.3s ease;
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 512 512" viewBox="0 0 512 512"><path d="M437.02 74.98C388.667 26.629 324.38 0 256 0S123.333 26.629 74.98 74.98C26.629 123.333 0 187.62 0 256s26.629 132.668 74.98 181.02C123.333 485.371 187.62 512 256 512s132.667-26.629 181.02-74.98C485.371 388.668 512 324.38 512 256s-26.629-132.667-74.98-181.02zM256 472c-119.103 0-216-96.897-216-216S136.897 40 256 40s216 96.897 216 216-96.897 216-216 216z"/><path d="M368.993 285.776c-.072.214-7.298 21.626-25.02 42.393C321.419 354.599 292.628 368 258.4 368c-34.475 0-64.195-13.561-88.333-40.303-18.92-20.962-27.272-42.54-27.33-42.691l-37.475 13.99c.42 1.122 10.533 27.792 34.013 54.273C171.022 389.074 212.215 408 258.4 408c46.412 0 86.904-19.076 117.099-55.166 22.318-26.675 31.165-53.55 31.531-54.681l-38.037-12.377z"/><circle cx="168" cy="180.12" r="32"/><circle cx="344" cy="180.12" r="32"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 512 512" viewBox="0 0 512 512"><path d="M437.02 74.98C388.667 26.629 324.38 0 256 0S123.333 26.629 74.98 74.98C26.629 123.333 0 187.62 0 256s26.629 132.668 74.98 181.02C123.333 485.371 187.62 512 256 512s132.667-26.629 181.02-74.98C485.371 388.668 512 324.38 512 256s-26.629-132.667-74.98-181.02zM256 472c-119.103 0-216-96.897-216-216S136.897 40 256 40s216 96.897 216 216-96.897 216-216 216z"/><path d="M368.993 285.776c-.072.214-7.298 21.626-25.02 42.393C321.419 354.599 292.628 368 258.4 368c-34.475 0-64.195-13.561-88.333-40.303-18.92-20.962-27.272-42.54-27.33-42.691l-37.475 13.99c.42 1.122 10.533 27.792 34.013 54.273C171.022 389.074 212.215 408 258.4 408c46.412 0 86.904-19.076 117.099-55.166 22.318-26.675 31.165-53.55 31.531-54.681l-38.037-12.377z"/><circle cx="168" cy="180.12" r="32"/><circle cx="344" cy="180.12" r="32"/></svg>');
    background-size: 25px;
    background-color: var(--button-color);
}

.emoji-btn:hover {
    cursor: pointer;
    background-color: var(--button-color-hover);
}
    */

/* Comment section */
.comment-div {
    margin: 1rem 0;
    word-wrap: break-word;
    font-family: var(--comment-text-font);
}

.comment-div .comment-div {
    margin-left: 1.75rem;
}

.comment-content-wrap {
    padding: 1rem 2rem;
    box-shadow: 0 0 2px 2px rgba(0,0,0,.1);
    border-radius: 5px;
}

.comment-name,
.comment-footer {
    font-family: var(--comment-title-font);
}

.comment-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.comment-date {
    color: #4f4f47;
    font-size: 0.9rem;
    margin-top: -5px;
    display: block;
}

.author-badge {
    color: var(--author-badge-color);
    font-size: 0.9rem;
}

.comment-content-wrap p {
    margin: .5rem 0 1.5rem;
}

.replying-to {
    color: #4f4f47;
    font-size: 0.9rem;
}

.replying-to:hover {
    color: #787872;
    cursor: pointer;
}

.comment-footer {
    font-size: 0.9rem;
}

.comment-reply-button,
.toggle-replies {
    color: var(--button-color);
    transition: color 0.3s ease;
}

.comment-reply-button svg {
    width: 11px;
    height: auto;
    margin-top: -5px;
    fill: var(--button-color);
}

.comment-reply-button:hover,
.toggle-replies:hover {
    color: var(--button-color-hover);
    cursor: pointer;
}

.toggle-replies {
    margin-left: 2rem;
}