/**
* OVERRIDE PHPBB STYLES
*/ 
div.inline-attachment {
    position: relative;
}

/**
* FANCYBOX CUSTOMIZATION
*/
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 00, 0.98);
    --right-col-width: 0px;
}

.fancybox__cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--right-col-width);

    height: 100%;
}

.fancybox__col {
    display: flex;
    flex-direction: column;
    min-height: 0;

    position: relative;
    overflow: hidden;
}

.f-button {
    background: transparent;
}

.fancybox__container .fancybox__caption {
    font-size: 0.75rem;
    color: #cccccc;
    font-style: italic;
    padding: 8px 12px;
    margin: 7px 0 2px 0;
    background: #222;
    border-radius: 15px;
    border: 1px #444 solid;
}

.f-button[data-fancybox-close] {
    color: #F22;
}
.f-button[data-fancybox-close]:hover:not([disabled]) {
    color: #F55;
}

/**
* COMMENTS
*/
.fancybox__sidebar {
    background-color: #222;
    color: #cccccc;
    display: flex;
    font-size: 0.75rem;
    line-height: 1.1rem;
}
.ric-sidebar__header {
    border-bottom: 1px #444 solid;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ric-sidebar__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
}
.ric-comments {
    overflow-y: auto;
    padding: 10px 0;
    flex-grow: 1;
}
.ric-comments button:focus {
    outline: none;
}
.ric-comments__info {
    padding: 10px 0;
    text-align: center;
}
.ric-comment {
    display: flex;
}
.ric-comment:not(:last-child) {
    margin-bottom: 15px;
}
.ric-comment__left {
    width: 50px;
    padding-left: 10px;
    padding-right: 5px;
}
.ric-comment__left .ric-avatar {
    width: 35px;
    height: 35px;
    border-radius: 18px;
}
.ric-comment__left .ric-avatar.ric-avatar-placeholder {
    background-color: #333;
}
.ric-comment__right {
    padding-right: 5px;
    flex-grow: 1;
}
.ric-comment__body {
    background-color: #333;
    border-radius: 18px;
    padding: 5px 10px 8px;
    margin-bottom: 3px;
}
.ric-comment__actions {
    float: right;
}
.ric-comment__actions button {
    font-size: 0.8rem;
    color: #aaa;
}
.ric-comment__actions button i.icon {
    font-size: 0.8rem;
}
.ric-comment__actions button:hover, .ric-comment__actions button:active {
    color: #fff;
}
.ric-comment__content {
    margin-top: 2px;
    word-break: break-word;
}
.ric-comment__content ul, .ric-comment__content ol {
    margin: 0 0 0 2em;
}
.ric-comment__info {
    padding: 0 10px;
    color: #aaa;
    font-size: 0.6rem;
}
.ric-message-box {
    border-top: 1px #444 solid;
    padding: 10px;
}
.ric-message-box a {
    color: #aaa;
    font-weight: bold;
}
.ric-message-input {
    width: 100%;
    height: 100px;
    background-color: #333;
    border: 1px #505050 solid;
    margin-bottom: 5px;
    color: #fff;
    resize: none;
    padding: 5px;
    border-radius: 4px;
}
.ric-message-input:hover, .ric-message-input:focus {
    outline-style: none;
    border-color: #11A3EA;
}
.ric-button {
    width: 100%;
    background-color: #555;
    padding: 5px 10px;
    border-radius: 4px;
}
.ric-button:hover, .ric-button:active {
    background-color: #666;
}
.ric-edit-button-container {
    display: flex;
    gap: 10px;
}
.ric-spinner-overlay {
    display: flex;
    justify-content: center;
	align-items: center;
	height: 100%;
}
#ric_toggle_sidebar {
    width: auto;
    padding: 0 9px;
}
#ric_toggle_sidebar svg {
	color: #00dd00;
}
#ric_comment_counter {
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 5px;
}
.ric-post-attachment-badges {
    position: absolute;
    right: 7px;
    bottom: 11px;
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 4px;
    cursor: pointer;
}
.ric-post-attachment-badges:hover, .ric-post-attachment-badges:active, .ric-post-attachment-badges:focus {
    text-decoration: none;
}
.ric-post-attachment-badge {
    background: rgba(0,0,0,0.6);
    padding: 4px 5px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.7rem;
    color: #cccccc !important;
    white-space: nowrap;
    z-index: 1;
}
@media screen and (min-width: 800px) {
    .fancybox__container.has-sidebar {
        --right-col-width: clamp(260px, 22vw, 320px);
    }
    .ric-sidebar__header {
        display: none;
    }
}
@media screen and (max-width: 799px) {
    .fancybox__container .fancybox__sidebar {
        top: 100%;
        transition: top 0.2s ease-in-out;
    }
    .fancybox__container.has-sidebar .fancybox__sidebar {
        top: 0;
    }
    .fancybox__sidebar {
        position: fixed;
        height: 100%;
        left: 0;
        right: 0;
        z-index: 111;
    }
}

/**
* RECENT COMMENTS
*/
.recentcomments li.header dt .list-inner {
    margin-right: 250px;
}
.recentcomments li.header dt {
    margin-right: -250px;
}
.recentcomments ul.topiclist.topics dt .list-inner {
    margin-right: 250px;
    padding: 0 0 0 15px;
    display: flex;
    flex-direction: column;
}
.recentcomments ul.topiclist.topics dt {
    margin-right: -250px;
    display: flex;
}
.recentcomments .row-item-image-link {
    width: 100px;
    flex-shrink: 0;
    text-align: center;
}
.recentcomments .row-item-image-link img {
    max-width: 100%;
    max-height: 74px;
}
.recentcomments .comment-text {
    margin-bottom: 0.5rem;
    color: #9d9d9d;
}
.recentcomments .comment-text.comment-text-short {
    font-style: italic;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
.recentcomments .comment-text a {
    /* color: inherit; */
    display: inline;
}
.recentcomments .comment-text a:hover {
    text-decoration: underline;
}
.recentcomments .comment-author {
    display: flex;
    align-items: end;
    flex-grow: 1;
}
#recentcomments-commentlist .forabg + .action-bar {
    margin-top: 4px;
}
.recentcomments-top .action-bar {
    margin-bottom: 0.5em;
}
.recentcomments-top .action-bar.bar-bottom {
	margin-top: -0.8em;
    margin-bottom: 1.5em;
}
.recentcomments-bottom .action-bar {
    margin-top: 0.5em;
}
.recentcomments-bottom .action-bar.bar-bottom {
	margin-top: -0.8em;
    margin-bottom: 1.5em;
}
#ric_add_comment {
    width: auto;
    padding: 0 7px;
}
table.table-recentcomments {
    width: 100%;
}
table.table-recentcomments thead th {
    color: #CCCCCC !important;
    font-weight: normal;
    text-transform: uppercase;
    line-height: 1.3em;
    font-size: 1em;
    text-align: left;
    padding: 0 5px 5px 5px;
}
table.table-recentcomments td {
    font-size: 1.1em;
    padding: 8px 5px;
    vertical-align: top;
}
table.table-recentcomments tbody tr:hover {
    background-color: rgba(0,0,0,0.05) !important;
}
table.table-recentcomments tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
table.table-recentcomments tbody tr td:not(:first-child) {
    border-left: 1px solid rgba(255,255,255,0.04);
}
table.table-recentcomments td:first-child, table.table-recentcomments th:first-child {
    padding-left: 0;
}
table.table-recentcomments td:last-child, table.table-recentcomments th:last-child {
    padding-right: 0;
}
table.table-recentcomments td:first, table.table-recentcomments th:first {
    padding-left: 0;
}
table.table-recentcomments .commentlist-image-cell {
    display: flex;
}
table.table-recentcomments .commentlist-image-cell .list-inner {
    padding: 0 0 0 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
/**
* RESPONSIVE
*/
@media screen and (max-width: 700px) {
	.fancybox__sidebar {
		font-size: 1rem;
		line-height: 1.35rem;
	}
	.fancybox__container .fancybox__caption {
		font-size: 1rem;
	}
	.ric-comment__actions button {
		font-size: 1.05rem;
	}
	.ric-comment__actions button i.icon {
		font-size: 1.05rem;
	}
	.ric-comment__info {
		font-size: 0.85rem;
	}
    .recentcomments ul.topiclist.topics dt .list-inner {
        margin-right: 0;
    }
    .recentcomments .row-item-image-link {
        width: 60px;
    }
}
@media screen and (min-width: 800px) {
    #ric_add_comment {
        display: none !important;
    }
}
@media screen and (max-width: 799px) {
    #ric_add_comment {
        display: flex;
    }
}

/* Light Mode */
/**
* FANCYBOX CUSTOMIZATION
*/
.darkmode .fancybox__container {
	--fancybox-color: #242424;
	--fancybox-hover-color: #000;
    --fancybox-bg: rgba(225,225,225,0.98);
}

.darkmode .fancybox__container .fancybox__caption {
    color: #333333;
    background: #DDDDDD;
    border: 1px #BBBBBB solid;
}
.darkmode .fancybox__toolbar {
	--f-button-bg: rgba(231, 231, 228, 0.65);
	--f-button-hover-bg: rgba(185, 185, 182, 0.65);
}
/*
.darkmode .f-button[data-fancybox-close] {
    color: #00DDDD;
}
.darkmode .f-button[data-fancybox-close]:hover:not([disabled]) {
    color: #00AAAA;
}
*/
/**
* COMMENTS
*/
.darkmode .fancybox__sidebar {
    background-color: #DDDDDD;
    color: #333333;
}

.darkmode .ric-sidebar__header {
    border-bottom: 1px #BBBBBB solid;
}

.darkmode .ric-comment__left .ric-avatar.ric-avatar-placeholder {
    background-color: #CCCCCC;
}

.darkmode .ric-comment__body {
    background-color: #CCCCCC;
}

.darkmode .ric-comment__actions button {
    color: #555555;
}

.darkmode .ric-comment__actions button:hover,
.darkmode .ric-comment__actions button:active {
    color: #000000;
}

.darkmode .ric-comment__info {
    color: #555555;
}

.darkmode .ric-message-box {
    border-top: 1px #BBBBBB solid;
}

.darkmode .ric-message-box a {
    color: #555555;
}

.darkmode .ric-message-input {
    background-color: #CCCCCC;
    border: 1px #AFAFAF solid;
    color: #000000;
}
/*
.darkmode .ric-message-input:hover,
.darkmode .ric-message-input:focus {
    border-color: #EE5C15;
}
*/
.darkmode .ric-button {
    background-color: #AAAAAA;
}

.darkmode .ric-button:hover,
.darkmode .ric-button:active {
    background-color: #999999;
}
/*
.darkmode #ric_toggle_sidebar svg {
	color: #FF22FF;
}

.darkmode .ric-post-comment-counter {
    background: rgba(255,255,255,0.6);
    color: #333333 !important;
}
*/
.darkmode .recentcomments .comment-text {
    color: #626262;
}

.darkmode table.table-recentcomments thead th {
    color: #333333 !important;
}

.darkmode table.table-recentcomments tbody tr:hover {
    background-color: rgba(255,255,255,0.95) !important;
}

.darkmode table.table-recentcomments tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(0,0,0,0.96);
}

.darkmode table.table-recentcomments tbody tr td:not(:first-child) {
    border-left: 1px solid rgba(0,0,0,0.96);
}

/*************/
/* Reactions */
/*************/
.ric-reaction-wrapper { position: relative; display: inline-block; }
.ric-reaction-picker {
    display: flex;
    gap: 5px;
    position: fixed;
    padding: 5px; 
    background: #eee7e0;
    border-radius: 20px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px) scale(0.95);
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}
.ric-reaction-wrapper:hover .ric-reaction-picker { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.ric-reaction-picker .ric-reaction-icon-wrapper {
    cursor: pointer;
}
.ric-reaction-picker .ric-reaction-icon {
    height: 20px;
    transition: transform 0.15s ease;
}
.ric-reaction-picker .ric-reaction-icon-wrapper:hover .ric-reaction-icon {
    transform: translateY(-3px) scale(1.1);
}

.ric-reaction-stats {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.ric-reaction-stats.is-empty { display: none; }
.ric-reaction-icons-list {
    display: flex;
    flex-direction: row-reverse; 
}
.ric-reaction-summary-item {
    width: 18px;
    height: 18px;
    margin-left: -3px;
}
.ric-reaction-summary-item img {
    width: 18px;
    height: 18px;
    display: block;
}
/* Tooltip Logic */
.ric-portal-tooltip {
    position: absolute;
    display: none;
    transform: translateX(-100%); 
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.ric-portal-tooltip.is-active {
    display: block;
}
.tooltip-row {
    margin-bottom: 6px;
    white-space: nowrap;
}
.tooltip-row:last-child {
    margin-bottom: 0;
}
.tooltip-mini-icon {
    width: 16px;
    height: 16px;
}
.tooltip-content {
    font-size: 11px;
}
