<style>
.microblog-editor-notice.aui-message.aui-message-info {
    display: none;
}
.micropost-left {
    display: none;
}
.micropost-right {
    margin: 0px 20px !important;
}
</style>
<!-- <script>
AJS.toInit(function(){
$("head").append(`<meta http-equiv="refresh" content="120">`);
});
</script> -->





<div id="edit-style-container"> </div>

<script>
let disableEKey = true; 
const countryAdminGroup = getQueryVariableFromUrl("cc") + "-admins";
var adminCanEdit = false;

async function checkIfCountryAdmin () {
    let groupsRes = await jQuery.ajax({
      url: "/rest/api/user/memberof?username=" + AJS.params.remoteUser,
      type: "get",
      dataType: "json"
    }).then(res => res);
	
	groupsRes = groupsRes.results;
    console.log(groupsRes);

    for (let i = 0; i < groupsRes.length; i++) {
      let groupName = groupsRes[i].name;
      if (groupName === countryAdminGroup) {
         adminCanEdit = true;
      } else if(groupName === "judging-administrators"){
         adminCanEdit = true;

		}
    }
	
	return true;
}

checkIfCountryAdmin().then(res => {
	if (!adminCanEdit) {
		document.getElementById("edit-style-container").innerHTML = (`<style> 
	.micropost .micropost-right .micropost-header .micropost-action-menu.show-permanent {
		display: none !important;
	}
 </style>`);
	}
});

    $(document).on("keydown", function (e) {
      // Disabled Keys are c, e, k, n, l
      disableKeys = [67, 69, 75, 76, 78];
	  console.log("keydown", e.target)
      if (disableEKey && disableKeys.includes(e.keyCode)) {
        e.preventDefault();
        return;
      }
    });
</script>




<style>
/* hide empty state */
.empty-state-container.medium {
    display: none !important;
}
div#full-height-container {
  overflow-y: scroll;
}
a.copy-micropost-permalink-action {
    display: none;
}
button.aui-button.globalTimelineMoreButton {
  visibility: hidden;
}
button.aui-button.globalTimelineMoreButton:after {
  content:'Show Older Posts';
  visibility: visible;
  display: block;
  position: relative;
  background-color: white;
  padding: 5px;
  top: 2px;
}
div#rw_wrapper {
    background: transparent;
}

div#postiontoggle {
    display: none;
}
div#custom-footer {
    display: none;
}
.aui-buttons.is-hidden {
    display: none;
}

.action-group.topic-select-container {
    visibility: hidden;
    border: 0px;
}

.editor {
    margin: 20px auto;
    background: transparent;
    background-color: transparent;
}


.mb-editor-container.textarea.full-width-field {
    border: 0px;
    background: transparent;
}

.editor-content {
    width: 90%;
    background: white;
    border-radius: 15px;
    padding: 10px 10px !important;
    backgroun-color: white;
    margin: auto;
}

.actions.is-hidden {
    border: 0px !important;
    width: 90%;
    margin: auto !important;
}

.new-posts-refresh-timeline-container {
    width: 170px;
    border-radius: 5px !important;
    margin: auto;
    font-family: var(--main-font-family);
}

a.microblog-new-posts-refresh-timeline-link {
    border-radius: 5px !important;
    margin: auto;
    color: white !important;
    font-family: var(--main-font-family);
}

button.aui-button.aui-button-link {
    color: white;
}

.aui-button.aui-button-primary[disabled] {
    color: white;
    opacity: .7;
}
</style>


<style>
/* Disable clicking links */ 
a.url.fn.confluence-userlink {
    pointer-events: none;
    cursor: default;
}

.micropost-saveDate a {
    pointer-events: none;
    cursor: default;
}

a.userLogoLink {
    pointer-events: none;
    cursor: default;
}
/* show mod always */
button.aui-button.aui-style-default.aui-dropdown2-trigger.aui-dropdown2-trigger-arrowless {
    opacity: 1 !important;
}
body .globaltimeline .microBlogContainer .microblog-header-container .microblogHeader {
    display: none;
}

span.microblog-tooltip {
    display: none;
}

.micropost-saveDate span.microblog-tooltip {display: block;font-size: 11px;font-weight: normal;font-stretch: normal;font-style: normal;line-height: 1.05;font-weight: 600;letter-spacing: 0.75px;}

.aui-iconfont-collapsed:before {
    display: none;
}

body .micropost .micropost-right .micropost-footer {
    display: none !important;
}

body .micropost .reply-editor {
    display: none;
}

div.micropost-entry {
    border-radius:15px;
    width: 90%;
    margin: auto;
    border-bottom: none;
    display: flex !important;
    padding: 20px 0px !important;

}

.micropost .micropost-right .micropost-header {
    padding-bottom: 10px;
}
body .micropost {
    border-top: 0px;
}
.microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar, .microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar .aui-avatar-inner, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar .aui-avatar-inner,.microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar .aui-avatar-inner img, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar .aui-avatar-inner img {
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    width: 52px;
}

.micropost .userLogoLink {
    margin: 10px;
    margin-left: 35px;
}

button.aui-button.globalTimelineMoreButton {
    background: white;
}

/* SHOW FOR ADMINS */
.micropost-action-menu.show-permanent {
    margin-right: 20px;
}

</style>


<style>
.aui-flag.qr-flag.aui-flag-stack-top-item {
    display: none !important;
}
</style>   
<style>
/* hide navbar */
#page div#rw_theme_header {
    display: none;
}

#rw_theme_header, #rw_theme_header {
    display: none;
}

#rw_theme_content {
	margin-top: 0px !important;
}

/* div#rw_wrapper {
	background: #516cad !important;
}

.rw_content_section #rw_main_column .rw_content {
	background: #516cad !important;
	padding-bottom: 50px !important;
} */

/* hide intercom */
#intercom-frame{ display: none! important;}
div#intercom-container {
    display: none !important;
}
.intercom-lightweight-app {
    display: none;
}
/* hide accessiBe */
body .acsb-trigger.acsb-ready {
    display: none !important;
}
</style>
<!-- <script>
AJS.toInit(function(){
$("head").append(`<meta http-equiv="refresh" content="30">`);
});
</script> -->


<!-- new styles --> <style>
.editor {
    margin: 20px auto;
    background: transparent;
    background-color: transparent;
    opacity: 0.62;
    border-radius: 9px;
    /* background-color: #1c1c1c; */
}

.editor-content {
    background-color: #1c1c1c;
    width: 90%;
    /* background: white; */
    border-radius: 15px;
    padding: 10px 10px !important;
    /* background-color: white; */
    margin: auto;
    font-family: Raleway;
    font-size: 14px;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.57;
    letter-spacing: normal;
    color: #fafafa;
}


.aui-button.aui-button-primary[disabled] {
    background-color: var(--primary-color);
    opacity: .7;
    color: white;
}

button.aui-button.aui-button-primary {}

#page .rw_content_spaces_white2.rw_content_menu_solid #main, #rw_wrapper {
    background: transparent;
}

.rw_body.rw_body_white, body.rw_body_white {
    background: transparent;
}

div#full-height-container {
    background: transparent;
    background-color: transparent;
}

div#main-content {
    background: transparent !important;
}

.globalTimelineMore {
    border-top: none;
}

.micropost-entry {
    border-radius: 9px;
    background-color: rgba(28, 28, 28, 0.28);
    /* opacity: .27; */
}

a.url.fn.confluence-userlink {
    color: white !important;
    font-weight: 500;
}

.micropost-saveDate span.microblog-tooltip {
    font-weight: 300;
    color: var(--primary-color);
}

.micropost .micropost-right div.micropost-content {
    font-family: Raleway;
    font-size: 14px;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.57;
    letter-spacing: normal;
    color: #fafafa;
} 
.empty-state-container .description-container {
    display: none;
}

.empty-state-container {
    background: #1c1c1c !important;
    opacity: .7;
    width: 90%;
    display: flex !important;
    max-width: unset !important;
}

.empty-state-container.medium .headline-container {
    color: var(--primary-color);
}
</style>


<style>
.timeline-editor-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

.timeline-editor-container .profile-picture {
    display: none;
}

span.microblog-tooltip {display: none !important;}

.micropost .micropost-right ul.micropost-meta li.micropost-saveDate .microblog-tooltip {
    display: block !important;
}

.micropost .micropost-right {}

.micropost .micropost-right div.micropost-content {
    margin-left: 0px;
}

.micropost .micropost-left {
    justify-content: center;
    align-items: center;
}

.aui-avatar.aui-avatar-large, .aui-avatar.aui-avatar-large .aui-avatar-inner {
    margin-top: 5px;
}
body .micropost {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 10px;
    margin: 0px;
}

body .micropost .reply-editor {
    display: none !important;
}
#rw_wrapper.rw_background_top .rw_background_section_background1 {
    display: none;
}
</style>



<style>

.micropost .micropost-right .micropost-header .micropost-action-menu.show-permanent {
display: none;
}

</style>




<style>
div.micropost-entry {
  padding: 20px 20px !important;
  width: calc(90% - 40px);
}
.micropost .userLogoLink {
  margin-left: 0px;
}

div#full-height-container::-webkit-scrollbar {
  background-color: rgba(84, 84, 84, 0.3);
  width: 14px;
}

div#full-height-container::-webkit-scrollbar-thumb {
  background-color: rgb(16,58,50);
  border-radius: 10px;
}

@media only screen and (max-width : 400px) {

	.microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar, .microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar .aui-avatar-inner, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar .aui-avatar-inner, .microBlogWrapper .microBlogContainer.slim .globalTimeline-container .globalTimeline .micropost-left .aui-avatar .aui-avatar-inner img, .microBlogWrapper .microBlogContainer.slim #microPostContextContainer .micropost-left .aui-avatar .aui-avatar-inner img {
		height: 28px;
		width: 28px;
	}
	/*
	div.micropost-entry {
		justify-content: center;
	}
	.microBlogWrapper .microBlogContainer.slim .micropost .micropost-left {
		height: 44px;
	}
	.aui-avatar.aui-avatar-large, .aui-avatar.aui-avatar-large .aui-avatar-inner {
		margin-top: 0px;
	}
	.microBlogWrapper .microBlogContainer.slim .micropost .micropost-left {
		margin-top: 5px;
	}
	.micropost .micropost-left {
		padding-right: 0px;
	}
	.micropost .userLogoLink {
		margin-left: 5px;
	}
	*/
	
	.micropost .micropost-right {
    	width: 80%;
		max-width: 80%;
		min-width: 80%;
	}
	.micropost .micropost-right .micropost-header {
		width: 100%;
	}
	.micropost-action-menu.show-permanent {
		margin-right: 0px;
	}
	div.micropost-entry {
		justify-content: flex-end;
	}
	.micropost .micropost-left {
		padding-right: 5px;
	}
	.microBlogWrapper .microBlogContainer.slim .micropost .micropost-left {
		margin-top: 0px;
	}
	.micropost .micropost-entry {
		width: 85%;
	}

}

.micropost .micropost-right {
    width: calc(100% - 64px);
}
.aui-button .aui-icon {
	color: white;
}
.wiki-content a.user-mention {
	background: rgba(0, 0, 0, 0.3) !important;
	pointer-events: none;
}
.wiki-content a.user-mention:hover, .wiki-content a.user-mention:active {
	background: rgba(0, 0, 0, 0.3) !important;
}
</style>