/**
 * Revised CSS for responsive Staff Pages
 *
 * This file is in version control:
 * https://github.com/uofa/staff-pages
 *
 * Created 10 Apr 2017
 * Updated 03 Sep 2020
 *
 * Last update: simplify styling of contact details, AB.
 *
 * @author Allan A Beattie
 * @author Debbie Tait
 * @author Jonathan J Mackintosh


/* contact details
------------------------------------------------------------ */

dl {
    margin-top: 0;
}

.staff_profile .content_heading {
    margin: 0 0 0.1em;
    font-size: 3em;
    font-weight: 300;
    line-height: 1em;
}

.postnominals {
    margin: 0 0 1em;
    font-size: 1.5em;
    font-weight: 300;
    line-height: 1em;
    color: #777;
}

.job_title {
    margin: 0 0 3em;
}

.tabcordion > dd > div.personal_details,
.tabcordion > dd > div#panel_publications_content {
    padding: 0;
}

#panel_profile .tabcordion > dd > div {
    padding-bottom: 0;
}

.staff_profile .staff_photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 2em;
    overflow: hidden;
    border-radius: 50%;
    background: #003c5f;
    text-align: center;
    vertical-align: middle;
}

.staff_profile .staff_photo img {
    max-width: 100%;
    width: 100%;
    height: auto;
}

.staff_profile .staff_photo.landscape img {
    max-width: 200%;
    height: 100%;
    width: auto;
}

.staff_profile h2 {
    font-weight: 700;
    margin: 0 0 2em;
    position: relative;
    z-index: 1;
}

.staff_profile h2.offscreen {
    position: absolute;
}

.staff_profile h2::before {
    border-bottom: .16em solid #f4c900;
    bottom: -1em;
    content: ' ';
    padding: .5em 0 0;
    position: absolute;
    width: 4em;
}

.staff_profile .contact dt,
.external-container dt {
    font-weight: 700;
    color: #575757;
}

.staff_profile .contact dd {
    margin: 0 0 0.5em 1em;
}

.staff_profile hr {
    border-color: #ddd;
    width: 100%;
}

.staff_profile .contact h2 {
    font-weight: 400;
    margin: 0 0 .3em;
}

.staff_profile .contact h2::before {
    content: none;
}

.email,
.tel {
    border-bottom: none;
    color: #444;
}

.update_link {
    text-align: right;
}


/* publication list controls
------------------------------------------------------------ */

#staffpages_publications_loading {
    position: absolute;
    top: -47px;
    left: -56px;
}

#loading {
    font-weight: normal;
}

#publication_jumpto {
    margin: 0 0 1em;
    padding: 1em;
    background: #354b8c;
}

#publication_jumpto b {
    display: inline-block;
    margin: 0 0 0.3em;
    font-weight: 400;
    color: #fff;
}

#type_form,
#type_form * {
    box-sizing: border-box;
}

#type_form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

#type_form label {
    font-weight: 400;
    color: #fff;
}

#type {
    background: #fff;
    width: 100%;
    margin-bottom: 0.3em;
    padding: 0.3em;
    border: 0;
}

#type:focus {
    background: #fdffce;
}

#type_form button {
    float: right;
    padding: 0.3em 0.6em;
    border: 0;
    background: #f4c900;
}

#type_form button:focus {
    outline: 0.3em solid gold;
}

#type_form button::before {
    font-family: FontAwesome;
    margin-right: 0.3em;
    content: '\f0b0';
}

#type_form button {
    float: right;
    padding: 0.3em 0.6em;
    border: 0;
    background: #f4c900;
}

#type_form button:focus {
    outline: 0.3em solid gold;
}

#type_form button::before {
    font-family: FontAwesome;
    margin-right: 0.3em;
    content: '\f0b0';
}

#publication_info {
    margin: 0 0 1em;
    padding: 0.5em;
    border: 1px solid #e9d8cf;
    background: #fdfdec;
    text-align: right;
    font-size: 0.9em;
}

#publication_page_indicator {
    float: left;
}


/* publications
------------------------------------------------------------ */

.publication_list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.publication_list_item {
    margin-bottom: 2em;
    padding-bottom: 2em;
    border-bottom: 1px solid #ddd;
}

.publication_list_item *:last-child {
    margin-bottom: 0;
}

.publication_title {
    margin: 0 0 0.3em;
    font-weight: 400;
}

.publication_date {
    display: block;
    margin: 0 0 0.3em;
}

.publication_authors,
.publication_location {
    margin: 0 0 0.6em;
}

.publication_authors {
    font-size: 0.8em;
}

.publication_location::before {
    display: inline-block;
    margin-right: 0.2em;
    font-family: FontAwesome;
    content: '\f02d';
    opacity: 0.3;
}

.publication_type {
    font-size: 0.8em;
    font-style: italic;
}

.publication_links {
    margin: -1px 0 0;
    padding: 0.3em 0.6em;
    list-style: none;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.publication_links dd {
    margin-left: 1.2em;
    word-wrap: break-word;
    word-break: break-all;
}

.can_toggle.collapsed {
    display: none;
}

.publication_links_toggle {
    padding: 0.3em 0.6em;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.publication_links_toggle::after {
    margin-left: 0.3em;
    font-family: FontAwesome;
    font-weight: 700;
    content: '';
}

.publication_links_toggle[aria-expanded="false"]::after {
    content: '\f107';
}

.publication_links_toggle[aria-expanded="true"]::after {
    content: '\f106';
}

.publication_links_toggle:focus {
    outline: 0.3em solid gold;
}

.latest-publications.publication_list_item {
    padding-bottom: 1em;
    margin-bottom: 1em;
}

.latest-publications.publication_list_item:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5em;
}

.latest-publications.publication_list_item a {
    border-bottom: none;
}

.latest-publications.publication_list_item a:hover,
.latest-publications.publication_list_item a:focus {
    border-bottom: 1px solid #0673ac;
}

a.latest-publications {
    background-color: #b90749;
    border-bottom: none;
    border-radius: 30px;
    color: #fff;
    padding: .5em 1.2em;
}


/* external profiles
------------------------------------------------------------ */

.external-container {
    clear: both;
}

@media screen and (min-width: 1280px) {
    .external-container {
        margin: 0;
        clear: none;
    }
}

dd.external-profiles a {
    display: inline-block;
    padding: 0 1em 0 0;
    border-bottom: none;
}

dd.external-profiles a:hover,
dd.external-profiles a:focus {
    text-decoration: underline;
}

dd.external-profiles img {
    margin-right: 0.7em;
    vertical-align: middle;
    width: 35px;
}


/* research and supervision areas
------------------------------------------------------------ */

.panel-research h2:first-of-type {
    margin-top: 0.5em;
}

ul.research-areas {
    margin-bottom: 2em;
}

ul.supervision-areas,
ul.research-areas,
ul.supervision-contact {
    clear: both;
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

ul.supervision-contact {
    padding: 1.8em 0 0 0;
}

ul.supervision-areas > li,
ul.research-areas > li,
ul.supervision-contact > li {
    margin: 0 0 1.2em 0;
    padding-bottom: 1.6em;
    border-bottom: 1px solid #ddd;
}

ul.research-areas > li:last-child {
    border-bottom: 0;
}

ul.research-areas.has_specialisms > li:last-child {
    border-bottom: 1px solid #ddd;
}

ul.supervision-areas > li > a,
ul.research-areas > li > a {
    float: right;
    margin-top: 0.6em;
    padding: 0.6em 1.2em;
    white-space: nowrap;
    border-bottom: none;
    border-radius: 30px;
    background-color: #f4c900;
    color: #444;
}

ul.supervision-areas > li > a:hover,
ul.research-areas > li > a:hover,
ul.supervision-contact > li > a:hover,
ul.supervision-areas > li > a:focus,
ul.research-areas > li > a:focus,
ul.supervision-contact > li > a:focus {
    opacity: .8;
}

ul.supervision-contact > li > a {
    background-color: #b90749;
    border-bottom: none;
    border-radius: 30px;
    color: #fff;
    padding: .5em 1.2em;
}

ul.supervision-contact > li > a::after {
    content: none;
}

ul.supervision-contact > li > a.supervision-research {
    background-color: #fff;
    border: 1px solid #1f3165;
    color: #1f3165;
}

.area_title {
    display: inline-block;
    font-weight: 700;
}

.area_accepting_phds {
    display: block;
}

.area_accepting_phds::after {
    display: inline-block;
    margin-left: 0.3em;
    vertical-align: bottom;
    font-family: FontAwesome;
    font-size: 1.3em;
    content: '\f058';
    color: #39b64a;
}

.research_areas_email_me {
    margin: 3.3em 0 2.6em;
    padding: 1.2em;
    background: #31498c;
    text-align: center;
    color: #fff;
}

.research_areas_email_me p {
    margin: 0;
}

.research_areas_email_me a {
    display: inline-block;
    clear: both;
    margin: 1em 0 0 0.3em;
    padding: 0.6em 1.2em;
    white-space: nowrap;
    border-bottom: none;
    border-radius: 30px;
    background-color: #bd044a;
    color: #fff;
}

main .research_areas_email_me a[href^="mailto:"]::after {
    display: none;
}

main .research_areas_email_me a::before {
    margin-right: 0.3em;
    font-family: FontAwesome;
    content: '\f1fa';
}

.research_areas_email_me a:hover,
.research_areas_email_me a:focus {
    border-bottom: 0;
}

.research_areas_email_me a:focus {
    outline: 0.3em solid gold;
}

#supervision + .information {
    margin-top: 3.3em;
}


/* qualifications
------------------------------------------------------------ */

.qualifications-table tr {
    border-top: 1px solid #ddd;
    height: 50px;
}

.qualifications-table td {
    vertical-align: middle;
}

.qualifications-table tr:first-of-type,
.qualifications-table .qualification-info {
    border-top: none;
}

.qualifications-table .qualification-info td {
    padding: 0 0 1em 0;
}

.qualifications-table .qualification-info .qualification-more-info {
    background: #f1f1f1;
    border-radius: .5em;
    padding: .8em 1em;
    display: block;
    overflow: auto;
}

/* teaching
------------------------------------------------------------ */

.panel-teaching h2:first-of-type {
    margin-top: 0.5em;
}

/* Images
------------------------------------------------------------ */

picture img,
picture[style*='float: left;'] img,
picture[style*='float: right;'] img,
.photo img,
.photo_right_aligned img,
.photo_left_aligned img {
    background: #fff;
    border: 1px solid #ccc;
    padding: 2px;
}

picture[style*='float: right;'] img,
.photo_right_aligned img {
    float: right;
    margin: 0 0 10px 10px;
}

picture[style*='float: left;'] img,
.photo_left_aligned img {
    float: left;
    margin: 0 10px 10px 0;
}

.overview_wrapper {
    clear: both;
}

dd.external-profiles {
    list-style: none;
    margin: 0 0 .4em .8em;
}

.personal_details {
    margin-top: 0.6em;
}

.personal_details_wrapper {
    width: 100%;
}

.personal_details_external {
    margin-top: 1em;
}


/* media queries
------------------------------------------------------------ */

@media screen and (min-width: 390px) {
    .area_title,
    .area_accepting_phds {
        float: left;
    }

    .area_title {
        width: 100%;
    }

    .area_accepting_phds {
        margin-top: 1.3em;
    }
}


@media screen and (min-width: 480px) {
    #type {
        float: left;
        width: 80%;
        height: 2em;
        margin-bottom: 0;
    }

    #type_form button {
        width: 20%;
        height: 2em;
        width: calc(20% - 0.3em);
    }

    #panel_publications_content {
        margin-top: 0.6em;
    }
}


@media screen and (min-width: 660px) {
    .staff_profile .has_image .contact_heading {
        float: left;
        width: 50%;
        width: calc(100% - 150px - 1rem);
        margin-left: 1rem;
    }

    .personal_details_photo {
        float: left;
    }

    .personal_details_wrapper {
        float: left;
    }

    .personal_details_wrapper.has_image_filename {
        float: left;
        width: 70%;
        width: calc(100% - 150px - 1em);
        margin-left: 1em;
    }
}


@media screen and (min-width: 730px) {
    ul.research-areas > li {
        margin-bottom: 0.6em;
        padding-bottom: 0.6em;
    }

    ul.research-areas > li a {
        margin-top: 0;
    }

    .area_title,
    .area_accepting_phds {
        float: none;
        display: inline-block;
        padding-top: 0.6em;
    }

    .area_title {
        width: auto;
    }

    .area_accepting_phds {
        margin-top: 0;
        margin-left: 0.6em;
    }
}


/* left menu comes in again...
------------------------------------------------------------ */

@media screen and (min-width: 940px) {
    .area_title,
    .area_accepting_phds {
        float: left;
    }

    .area_title {
        width: 100%;
    }

    .area_accepting_phds {
        margin-top: 0;
        margin-left: 0;
    }
}


@media screen and (min-width: 1280px) {
    .staff_profile .contact {
        float: left;
    }

    .staff_profile .has_external_links .contact {
        width: 60%;
    }

    .personal_details_external {
        box-sizing: border-box;
        float: right;
        width: 35%;
        margin: 0;
    }

    .external-container dd {
        font-size: 0.8em;
    }

    .area_title,
    .area_accepting_phds {
        float: none;
        display: inline-block;
        padding-top: 0.6em;
    }

    .area_title {
        width: auto;
    }

    .area_accepting_phds {
        margin-top: 0;
        margin-left: 0.6em;
    }
}
