/* Layout fixes so the EdiFabric theme can sit on the existing EdiNation pages. */

body.app-contact {
    padding-top: 0;
    height: 100%;
    overflow: hidden;
}

.header.fixed-top {
    height: 55px;
    display: flex;
    align-items: center;
}

.header .branding {
    padding: 0 12px !important;
    height: 100%;
    width: 100%;
}

.header .branding > .container-fluid,
.header .navbar {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.header .site-logo .df-logo {
    margin-top: 0;
    font-size: 22px;
    line-height: 1;
}

.header .nav-link {
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.2;
}

.header .api-key-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    /*margin-left: 0.75rem;*/
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #1b2e4b;
    font-size: 1.0625rem;
}

.header .api-key-btn:hover,
.header .api-key-btn:focus {
    background: transparent;
    color: #4550E6;
}

.header .dropdown-item.has-icon {
    display: flex;
    align-items: center;
}

.header .dropdown-item .theme-icon-holder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    padding: 0;
}

.header .dropdown-item .theme-icon-holder .logo-ef-bg {
    display: block;
    margin: 0;
    width: 14px;
    height: 17px;
}

body.app-contact .contact-wrapper {
    top: 55px;
}

body.page-profile {
    padding-top: 55px;
}

@media (min-width: 992px) {
    .header.fixed-top {
        height: 60px;
    }

    .header .site-logo .df-logo {
        font-size: 24px;
    }

    body.app-contact .contact-wrapper {
        top: 60px;
    }

    body.page-profile {
        padding-top: 60px;
    }
}

@media (max-width: 991.98px) {
    .header .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        padding: 0.75rem 1rem 1rem;
        z-index: 20;
    }

    .header .navbar-collapse .nav-link {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

@media (min-width: 992px) {
    .header .navbar-nav {
        flex-wrap: nowrap;
    }

    .header .nav-link {
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .header .nav-link {
        font-size: 0.82rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .header .navbar-nav > .nav-item {
        margin-right: 0.35rem !important;
    }
}

#contactContentHide {
    color: #252930;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

#contactContentHide:hover,
#contactContentHide:focus {
    color: #4550E6;
    text-decoration: none;
}

body.page-profile .content-fixed {
    margin-top: 0;
}

.contact-content-header > nav > .d-flex {
    align-items: center;
}

/* Switches: the track and knob are centred on the first line of the label,
   so single- and multi-line labels line up the same way everywhere. */
.custom-switch {
    display: flex;
    align-items: flex-start;
    min-height: 1.5rem;
    margin: 0;
    padding-left: 3rem;
}

.custom-switch .custom-control-label {
    position: relative;
    margin-bottom: 0;
    line-height: 1.5rem;
    cursor: pointer;
}

.custom-switch .custom-control-label::before,
.custom-switch .custom-control-label::after {
    top: 0.75rem;
    transform: translateY(-50%);
}

.custom-switch .custom-control-label::before {
    left: -2.75rem;
    width: 2.25rem;
    height: 1.25rem;
    border-radius: 1rem;
}

.custom-switch .custom-control-label::after {
    left: calc(-2.75rem + 3px);
    width: calc(1.25rem - 6px);
    height: calc(1.25rem - 6px);
    border-radius: 50%;
    transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translate(1rem, -50%);
}

.contact-content-header .custom-switch {
    align-items: center;
}

/* Keep the editor's small icon buttons after the theme button styles. */
.btn.btn-xs {
    font-size: 12px;
    padding: 5px 6px;
    border-radius: 0.25rem;
    line-height: 1.2;
}

.btn.btn-white {
    background-color: #fff;
    border-color: #c0ccda;
    color: rgba(27, 46, 75, 0.7);
}

.btn.btn-white:hover,
.btn.btn-white:focus {
    background-color: #fff;
    border-color: #8392a5;
    color: #1b2e4b;
}

/* ---------- Header, logo and main menu ---------- */
.header .site-logo .df-logo {
    color: #1b2e4b;
    letter-spacing: -0.5px;
}

.header .site-logo .df-logo span {
    color: #4550E6;
}

.header .site-logo .df-logo:hover,
.header .site-logo .df-logo:focus {
    color: #1b2e4b;
    text-decoration: none;
}

.header .site-logo .avatar {
    margin-right: 0.5rem;
}

.header .navbar .nav-link {
    color: #5d6778;
    font-weight: 500;
}

.header .navbar .nav-link:hover,
.header .navbar .nav-link:focus {
    color: #252930;
}

.header .navbar .nav-item.active > .nav-link,
.header .navbar .nav-link.active {
    color: #4550E6;
}

.header .navbar-toggler {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header .navbar-toggler span,
.header .navbar-toggler:not(.collapsed) span:nth-child(1),
.header .navbar-toggler:not(.collapsed) span:nth-child(2),
.header .navbar-toggler:not(.collapsed) span:nth-child(3) {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    width: 22px;
    height: 2px;
    margin: 2.5px 0;
    border-radius: 2px;
    background-color: #4550E6;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.header .navbar-toggler:not(.collapsed) span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header .navbar-toggler:not(.collapsed) span:nth-child(2) {
    opacity: 0;
}

.header .navbar-toggler:not(.collapsed) span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991.98px) {
    .header .branding > .container-fluid,
    .header .navbar {
        position: static !important;
    }

    .header .navbar {
        flex-wrap: nowrap;
        align-items: center;
    }

    .header .navbar-toggler {
        display: inline-flex;
        order: 3;
        align-self: center;
        margin: 0 0 0 0.5rem;
    }

    .header .api-key-btn {
        order: 2;
        margin-left: auto;
    }

    .header .navbar-collapse {
        order: 4;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 55px);
        overflow-y: auto;
        padding: 0.5rem 0.75rem 1rem !important;
        border-top: 1px solid #e7e9ed;
        box-shadow: 0 12px 24px rgba(27, 46, 75, 0.12);
    }

    .header .navbar-collapse .nav-item {
        margin: 0 !important;
    }

    .header .navbar-collapse .nav-link {
        padding: 0.75rem !important;
        border-radius: 0.5rem;
    }

    .header .navbar-collapse .nav-item.active > .nav-link {
        background: #f5f6fe;
    }

    .header .navbar-collapse .dropdown-menu {
        position: static;
        float: none;
        margin: 0;
        padding: 0 0 0.25rem 0.5rem;
        border: 0;
        box-shadow: none !important;
        animation: none;
    }

    .header .navbar-collapse .dropdown-menu::before,
    .header .navbar-collapse .dropdown-menu::after {
        display: none;
    }

    .header .navbar-collapse .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}

/* ---------- Sidebar status ---------- */
.contact-sidebar-header .list-inline {
    display: flex;
    align-items: center;
}

#liStatus {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 36px;
    margin: 0;
    white-space: nowrap;
}

#liStatus #liStatusText {
    line-height: 1.25;
}

#liStatus .contact-content-show2 {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

/* ---------- JSON / Text tabs ---------- */
.contact-content-header .edi-tabs {
    align-self: stretch;
    align-items: stretch;
    flex-wrap: nowrap;
}

.contact-content-header .edi-tabs > .nav-link:not(.btn) {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.contact-content-header .edi-tabs > .nav-link.active::before {
    bottom: -1px;
    border-bottom: 2px solid #4550E6;
}

.contact-content-header .edi-tabs > .nav-link.active {
    color: #4550E6;
}

.contact-content-header .edi-tabs > .nav-link + .nav-link {
    margin-left: 1.75rem;
}

.contact-content-header .edi-tabs > #formatShare {
    align-self: center;
    margin-left: 1.25rem;
    color: #4550E6;
}

.contact-content-header .edi-tabs > #formatShare::before {
    display: none;
}

/* ---------- Toolbar buttons ---------- */
.contact-sidebar-header .btn,
.contact-content-header .btn,
.tab-pane .btn {
    height: 36px;
    min-width: 36px;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.contact-sidebar-header .btn.btn-icon,
.contact-content-header .btn.btn-icon,
.tab-pane .btn.btn-icon {
    width: 36px;
    padding: 0;
}

.contact-sidebar-header .btn svg,
.contact-content-header .btn svg,
.tab-pane .btn svg {
    width: 16px;
    height: 16px;
}

.btn.btn-light {
    background-color: #f5f6fe;
    border: 1px solid #dee1fc;
    color: #4550E6;
}

.btn.btn-light:hover,
.btn.btn-light:focus,
.show > .btn.btn-light.dropdown-toggle {
    background-color: #e8eafd;
    border-color: #c9cdfa;
    color: #3540d4;
}

.btn.btn-light:disabled,
.btn.btn-light.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-group > .btn.btn-light:not(:first-child) {
    border-left-color: #dee1fc;
}

.contact-content-header .btn-group,
.contact-sidebar-header .btn-group {
    margin-right: 0.5rem !important;
}

.contact-content-header .settings-input {
    height: 36px !important;
    border: 1px solid #dee1fc;
    border-radius: 0;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.modal-footer .btn {
    min-width: 96px;
}

#emptyRowText {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0;
    color: #5d6778;
}

@media (max-width: 575.98px) {
    .contact-sidebar-header .btn,
    .contact-content-header .btn {
        height: 32px;
        min-width: 32px;
        padding: 0 0.625rem;
        font-size: 0.75rem;
    }

    .contact-sidebar-header .btn.btn-icon,
    .contact-content-header .btn.btn-icon {
        width: 32px;
    }

    .contact-content-header .btn-group {
        margin-right: 0.25rem !important;
    }
}

/* ---------- Privacy badge ---------- */
.privacy-pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 0.875rem;
    margin-right: 1rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 183, 89, 0.28);
    background: rgba(16, 183, 89, 0.08);
    color: #0b8a45;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.privacy-pill i {
    margin-right: 0.5rem;
    font-size: 0.8125rem;
}

.privacy-pill:hover,
.privacy-pill:focus {
    background: rgba(16, 183, 89, 0.14);
    color: #08733a;
    text-decoration: none;
}

/* ---------- Settings modals ---------- */
.settings-list .custom-control {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #e7e9ed;
}

.settings-list .custom-control:last-child {
    border-bottom: 0;
}

.settings-list .custom-control-label {
    color: #252930;
    font-weight: 500;
}

.settings-list .custom-control-label small {
    display: block;
    margin-top: 0.125rem;
    color: #828d9f;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
}

.modal-subtitle {
    color: #828d9f;
    font-size: 0.8125rem;
}

#sidebar-formats .dropdown-menu > .row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 1rem;
}

#sidebar-formats .dropdown-menu .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#sidebar-formats .dropdown-menu .dropdown-header {
    font-size: 12px;
}

#sidebar-formats .list-inline-skills .list-inline-item {
    margin-right: 5px;
}

#sidebar-formats .list-inline-skills .list-inline-item a {
    min-width: 48px;
    padding-left: 5px;
    padding-right: 5px;
    text-align: center;
}

.modal-body .d-sm-flex > .flex-fill {
    min-width: 0;
}

.modal-footer {
    flex-wrap: nowrap;
    justify-content: space-between;
}

.modal-footer > .badge {
    margin-left: 0 !important;
    padding-left: 0;
    white-space: normal;
    text-align: left;
}

.modal-footer > .badge + .wd-100p {
    width: auto !important;
    flex: 0 0 auto;
}

/* ---------- Spec library versions ---------- */
#sidebar-formats .dropdown-menu .col-sm-12 {
    padding-left: 1rem;
    padding-right: 1rem;
}

#sidebar-formats .dropdown-menu .dropdown-header {
    padding-left: 0 !important;
}

/* ---------- Footer (API status page) ---------- */
.footer {
    display: block;
    padding: 0;
    font-family: inherit;
    font-size: 0.875rem;
    letter-spacing: normal;
    text-transform: none;
    background-color: #fff;
}
