/*
    Normal stylings
*/

:root { /* Modal Vars */
    --bg: #eee;
    --fg: #494949;
    --border: rgba(120,120,130,0.3);
    --hover: rgba(100,100,130,0.2);
    --confirmation: rgb(38, 133, 0);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #24262d;
        --fg: white;
    }
}

/* Styles for the mute/block modal popup */

.fediactmodal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    margin: 0;
    padding: 0;
    display: flex;
    font-size: 1rem;
    animation: fadeIn .2s;
}

.fediactmodalinner {
    background-color: var(--bg);
    border: 1px solid var(--border);
	width: 80%;
	max-width: 300px;
	margin: auto;
	padding: .4em;
    border-radius: 8px;
    animation: scaleInSmall .2s;
}
.fediactmodalitem {
    position: relative;
    display: block;
	padding: .7em;
    border-radius: 6px;
    cursor: pointer;
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
    transition: background-color .4s;
}
.fediactmodalitem:hover, .fediactmodalitem:focus-within {
    background-color: var(--hover);
}
.fediactmodallink {
    display: flex;
    align-items: center;
    cursor: pointer;
	text-decoration: none;
	color: var(--fg);
    margin: -.7em;
    padding: .7em;
    border-radius: inherit;
    box-shadow: inset 0 0 0 var(--confirmation);
    transition: padding .2s, color .2s, box-shadow .2s cubic-bezier(.2,.2,0,1);
}
.fediactmodallink span:not(:first-of-type) {
    position: absolute;
    right: .7em;
    font-size: .8em;
    padding: .2em .4em;
    border-radius: 4px;
    background-color: white;
    color: var(--confirmation);
    animation: scaleInFadeSmall .2s;
}
.fediactmodallink.activated {
    box-shadow: inset 300px 0 0 var(--confirmation);
    color: white;
    font-weight: 600;
}

/* Styles for "resolving..." indicator */

.fediactprocessing {
    color: white;
	padding-right: 10px;
	padding-left: 10px
}

/* Styles for unresolved indicator */

.fediactunresolved {
    color: orange;
    font-weight: bold;
    padding-right: 10px;
    padding-left: 10px
}

/* Styles for after a poll was voted */

.fediactvoted {
    font-style: italic;
}

.fediactvoted > a {
    font-weight: bold !important;
    color: orange !important;
}

/* Inserted in the bottom right of any external instance where FediAct is running */

.fediacticon {
    height: 32px;
    width: 32px;
    position: fixed;
    z-index: 99998;
    bottom: 15px;
    right: 10px;
    background: url('data:image/png;base64,[encoded data, 4648 characters]');
    background-size: 32px 32px;
    cursor: pointer;
}

.fediactsettings_onsite {
    position: fixed;
    z-index: 99998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    margin: 0;
    padding: 0;
    display: none;
}

.fediactsettings_onsite  .fediactsettings_onsite_inner {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 10px 15px;
    background: white;
    border-radius: 5px;
}

.fediactsettings_onsite  .fediactsettings_onsite_inner a {
    color: blue !important;
}

/* Needed for pleroma to grab external source href */
body div#popovers {
    display: none !important;
}

/* Keyframes */

@keyframes fadeIn {
    from {
        filter: opacity(0);
    }
}
@keyframes fadeOut {
    to {
        filter: opacity(0);
    }
}
@keyframes scaleInSmall {
    from {
        transform: scale(.98);
    }
}
@keyframes scaleInFadeSmall {
    from {
        transform: scale(.98);
        filter: opacity(0);
    }
}


/*  
    We insert these styles for the DOMNodeAppeared function as separate stylesheet (see manifest) to fix
    Firefox blocking script-inserted <style> elements due to the site's CSP (long time bug)
*/

@-moz-keyframes nodeInserted { 
    from {
        opacity: 1;
    } to {
        opacity: 1;
    }
}
@-webkit-keyframes nodeInserted { 
    from {
        opacity: 1;
    } to {
        opacity: 1;
    }
}
@-ms-keyframes nodeInserted { 
    from {
        opacity: 1;
    } to {
        opacity: 1;
    }
}
@-o-keyframes nodeInserted {
    from {
        opacity: 1;
    } to {
        opacity: 1;
    }
}
@keyframes nodeInserted { 
  from { 
      opacity: 1;
  } to {
      opacity: 1;
  }
}

div.status,
div.detailed-status,
div.detailed-status__action-bar,
div.account__header button.logo-button,
div.account__header button.button--follow,
div.public-account-header a.logo-button,
div.account-card a.logo-button,
div.directory-card a.icon-button,
div.detailed-status a.logo-button,
button.remote-button,
script#initial-state,
div.Status { 
    -webkit-animation-name: nodeInserted !important;
    -webkit-animation-duration: 0.001s !important;
    -ms-animation-name: nodeInserted !important;
    -ms-animation-duration: 0.001s !important;
    -moz-animation-name: nodeInserted !important;
    -moz-animation-duration: 0.001s !important;
    -o-animation-name: nodeInserted !important;
    -o-animation-duration: 0.001s !important;
    animation-name: nodeInserted !important;
    animation-duration: 0.001s !important;
}
