/*
TODO: rename chrome-web-comments-* to usual short names
*/

#chrome-web-comments-panel{
    padding: 0;
    position: fixed;
    visibility: hidden;
    transition: right .3s, left .3s, top .3s, bottom .3s;
    z-index: 9999999999999;
    touch-action: none;
}

#chrome-web-comments-panel.slide-right{
    right: -100%;
    top: 0px;
}

#chrome-web-comments-panel.slide-left{
    left: -100%;
    top: 0px;
}

#chrome-web-comments-panel.slide-top{
    top: -100%;
    left: 0px;
}

#chrome-web-comments-panel.slide-bottom{
    bottom: -100%;
    left: 0px;
}

#chrome-web-comments-panel.active{
    visibility: visible;
    transition: right .3s, left .3s, top .3s, bottom .3s;
}

#chrome-web-comments-panel.slide-right.active{
    right: 0;
}

#chrome-web-comments-panel.slide-left.active{
    left: 0;
}

#chrome-web-comments-panel.slide-top.active{
    top: 0;
}

#chrome-web-comments-panel.slide-bottom.active{
    bottom: 0;
}


#panel-payload{
    height: 100%;
    background: #fff;
    padding: 20px;
    padding-top: 10px;
    border: solid 1px #ccc;
    box-shadow: 0px 0px 10px 5px #ccc;
    display: flex;
    flex-direction: column;
}

#touch-resizer {
    width: 100%;
    box-sizing: border-box;
    touch-action: auto;
}

#chrome-web-comments-panel-button{
    position: fixed;
    top: 25%;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    right: 0px;
    cursor: pointer;
    padding: 0.6em;
    border: solid 1px #ccc;
    font-size: large;
    z-index: 9999999999998;
}

#direction-switcher {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999999997;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#direction-switcher button {
    padding: 10px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    font-size: 18px;
}

#direction-switcher button:hover {
    background: #f0f0f0;
}

#chrome-web-comments-panel-close{
    background: none;
    border: none;
    font-size: 27pt;
    position: absolute;
    right: 0px;
    top: 0px;
    margin-right: 0.5em;
    color: #f00;
    cursor: pointer;
    transition: transform 0.5s ease;
}

#chrome-web-comments-panel-close:hover {
    color: #ccc;
    transform: rotate(360deg);
}

#chrome-web-comments-form {
}

.name-label {
    padding: 0.15em 0;
}

#chrome-web-comments-form label input[name="name"]{
    padding: 0.2em;
    border: solid 1px #ccc;
    border-bottom: solid 1px #ccc;
    width: 12em;
    box-sizing: border-box;
}

#chrome-web-comments-form label textarea[name="comment"]{
    width: 100%;
    height: 6em;
    resize: vertical;
    border: solid 1px #ccc;
    padding: 0.2em;
    box-sizing: border-box;
    touch-action: auto;
    overscroll-behavior: contain;
}

#chrome-web-comments-form label button[name="add"]{
    width: 140px;
    height: 30px;
    border: solid 1px #ccc;
    cursor: pointer;
}

#rules-link {
}

#chrome-web-comments-lists{
    flex: 1;
    overflow: auto;
    padding-right: 0.5em;
    padding-bottom: 1.8em;
    touch-action: auto;
    overscroll-behavior: contain;
}

.chrome-web-comments-item-wrap{
    position: relative;
}

.chrome-web-comments-item{
    padding: 0.3em 0.7em;
    margin: 0.4em;
    transition: .3s;
    background: #f1f1f1;
    position: relative;
    border-radius: 10px;
}

.cwc-my-comment-true{
    background: #e3fee0;
}

.chrome-web-comments-item-user{
    color: #7f7f7f;
    font-size: 14pt;
    text-align: left;
}

.chrome-web-comments-item-footer{
    display: flex;
    color: #ccc;
    justify-content: space-between;
}

.chrome-web-comments-item-titlebar {
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    font-size: small;
}

.chrome-web-comments-item-date{
    padding: 0.5em;
    color: #ccc;
    font-size: 11px;
    vertical-align: text-top;
}

.chrome-web-comments-item-comment{
    margin-top: 0.4em;
    margin-bottom: 0.4em;
    overflow-wrap: break-word;
}

.chrome-web-comments-item-answear{
    text-align: right;
    color: #009fff;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    position: relative;
}

.cwc-answear-form{
    display: none;
    margin-top: 25px;
}

.cwc-answear-form textarea{
    width: 100%;
    height: 45px;
    resize: vertical;
    outline: none;
    border: solid 1px #ccc;
    touch-action: auto;
    overscroll-behavior: contain;
}

.cwc-answear-form-buttons{
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 0.4em;
}

.cwc-child-list{
    margin-left: 35px;
}
.cwc-child-list .chrome-web-comments-item{
    border-top-left-radius: 0;
}

.cwc-answear-user{
    color: #00a9fb;
    cursor: pointer;
}

.chrome-web-comments-item.active{
    background: #feffc6;
}

#chrome-web-comments-form label{
    position: relative;
    margin-bottom: 0.2em;
    display: block;
}

#cwc-error{
    text-align: center;
    padding: 0.3em;
    height: 1.5em;
    color: #f00;
}

body
{
    width: auto;
    max-width: none;
    border: none;
    margin: 0;
}

@media (max-width: 800px) {
    body {
        width: 750px;
        max-width: 100%;
        background-color: gainsboro;
        padding-bottom: 1em;
        border: 1px solid #b4b4b4;
        margin: 1px;
    }
}

h1
{
    text-align: center;
}

ul
{
    list-style: none;
    user-select: none;
}

.del_or_not
{
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
    font-size: 1.7em;
}

#panel-subscribe
{
    display: flex;
    gap: 0.6em;
    flex-wrap: wrap;
}

.subscription-link.have-unread
{
    font-weight: bold;
}

.subscription-link.removed
{
    text-decoration: line-through;
}

.buttons
{
    text-align: center;
}

.reactions-reminder {
    cursor: pointer;
    color: #ccc;
}

img.pict {
    height: 1.6em;
    width: auto;
}

.reaction-button {
    border: solid 1px #ccc;
    border-radius: 3em;
}

.reaction-button:hover {
    background-color: lightgray;
}

.reaction-button.selected {
    border: solid 1px #000;
}

.reactions-not-involved {
    visibility: hidden;
}

.reactions-bar:hover .reactions-not-involved {
    visibility: visible;
}

.nav {
    text-align: center;
    margin-bottom: 1em;
    margin-top: 5px;
    padding: 2px;
    display: flex;
    gap: 0.3em;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    font-size: 12pt;
}

@media (min-resolution: 2dppx) {
    .nav, .nav-link {
        font-size: 24pt;
    }
}

.nav:before, .nav:after {
    content: "";
    display: table
}

.nav:after {
    clear: both
}

#panel-size-control {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999999996;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#panel-size-control label {
    font-size: 12px;
    color: #333;
}

#panel-size-slider {
    width: 100px;
}

#panel-resize-handle {
    position: absolute;
    background: #ccc;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.2s;
}

#panel-resize-handle:hover {
    background: rgb(148, 148, 148);
}

#panel-resize-handle-center {
    position: absolute;
    background: #ccc;
    z-index: 11;
    opacity: 1;
    border: 1px solid #999;
    border-radius: 0.3em;
    transition: opacity 0.2s;
}

#panel-resize-handle-center:hover {
    opacity: 1;
    background: #aaa;
}

#panel-resize-handle-center::before,
#panel-resize-handle-center::after {
    content: '';
    position: absolute;
    background: #999;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle-center::before,
#chrome-web-comments-panel.slide-left #panel-resize-handle-center::before {
    top: 10%;
    bottom: 10%;
    left: 40%;
    width: 2px;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle-center::after,
#chrome-web-comments-panel.slide-left #panel-resize-handle-center::after {
    top: 10%;
    bottom: 10%;
    left: 60%;
    width: 2px;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle-center::before,
#chrome-web-comments-panel.slide-bottom #panel-resize-handle-center::before {
    top: 40%;
    left: 10%;
    right: 10%;
    height: 2px;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle-center::after,
#chrome-web-comments-panel.slide-bottom #panel-resize-handle-center::after {
    top: 60%;
    left: 10%;
    right: 10%;
    height: 2px;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle,
#chrome-web-comments-panel.slide-left #panel-resize-handle {
    top: 0;
    width: 3px;
    height: 100%;
    cursor: ew-resize;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle {
    left: 0;
}

#chrome-web-comments-panel.slide-left #panel-resize-handle {
    right: 0;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle,
#chrome-web-comments-panel.slide-bottom #panel-resize-handle {
    left: 0;
    height: 3px;
    width: 100%;
    cursor: ns-resize;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle {
    bottom: 0;
}

#chrome-web-comments-panel.slide-bottom #panel-resize-handle {
    top: 0;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle-center,
#chrome-web-comments-panel.slide-left #panel-resize-handle-center {
    top: 50%;
    width: 0.9em;
    height: 3em;
    transform: translateY(-50%);
    cursor: ew-resize;
    background: #ccc;
    display: none;
}

#chrome-web-comments-panel.slide-right #panel-resize-handle-center {
    left: 0;
}

#chrome-web-comments-panel.slide-left #panel-resize-handle-center {
    right: 0;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle-center,
#chrome-web-comments-panel.slide-bottom #panel-resize-handle-center {
    left: 50%;
    height: 0.9em;
    width: 3em;
    transform: translateX(-50%);
    cursor: ns-resize;
    background: #ccc;
}

#chrome-web-comments-panel.slide-top #panel-resize-handle-center {
    bottom: -0.45em;
}

#chrome-web-comments-panel.slide-bottom #panel-resize-handle-center {
    top: -0.45em;
}

#mobile-bottom-panel-button {
    position: fixed;
    bottom: 3vh;
    right: 10vw;
    width: 10vh;
    height: 10vh;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: solid 1px #ccc;
    cursor: pointer;
    z-index: 9999999999999;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-bottom-panel-button .circular-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#mobile-bottom-panel-button .circular-text text {
    font-size: 1.8vh;
    fill: #333;
}

#mobile-bottom-panel-button div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

#mobile-comments-avail {
    font-size: 5vh;
    font-weight: bold;
}

#mobile-zero-comments {
    font-size: 1.4vh;
    line-height: 1.2;
    padding: 0.5vh;
}

#chrome-web-comments-panel.active ~ #mobile-bottom-panel-button {
    display: none;
}

.rules {
    max-width: 100%;
    background-color: white;
}

.rules h3 {
    text-align: center;
}

.rules ul {
    list-style: decimal;
    user-select: text;
}

.nav-link {
    text-align: center;
    font-size: 12pt;
}

.page-title {
    text-align: center;
    font-size: 14pt;
}

.error-message {
    text-align: center;
    padding: 0.3em;
    height: 1.5em;
    color: #f00;
}

.link-section {
    text-align: center;
}

.top-subscriptions-link {
    text-align: center;
    margin-bottom: 10px;
}

.popup-page ul {
    padding-left: 1.2em;
}

#recentList {
    list-style: disc;
    margin-left: 0.7em;
    text-indent: -0.5em;
}

/* Debug elements - hidden by default */
#direction-switcher {
    display: none;
}

#panel-size-control {
    display: none;
}

