/*
// filename:  main-style.css
//
// Copyright 2022 Tehama Inc. and its affiliates or licensors
//
// description:  This stylesheet provides styling for elements in the main area of the page that are not in the
//               article area and whose styling is not covered by elements in the style.css stylesheet.
//
//               Essentially, this fixes accessibility errors found in the main area (in the case of the article
//               template, excluding the article section) that are not styled by style.css.
//
//               Include the stylesheet in the header.hbs template as follows:
//
//                   <link href="{{asset 'main-style.css'}}" rel="stylesheet" type="text/css" />
//
*/

/* The dropdown elements of the "T" menu in the description text box toolbar on the new request page ("Submit a       */
/* request") are, in the Copenhagen theme v2.16.3, given role "button", but this breaks accessibility rules, so we    */
/* have fixed that by changing the role to be option.  But now these elements lack the styling given to the following */
/* element selectors:                                                                                                 */
/*                                                                                                                    */
/*      #hc-wysiwyg [role=menu]>[role=button][data-block=p]                                                           */
/*      #hc-wysiwyg [role=menu]>[role=button]                                                                         */
/*                                                                                                                    */
/*      These stylings are found in the application...b35f9.css stylesheet, which is inaccessible to us, so we are    */
/*      providing the equivalent styling for when the role is option here.                                            */
#hc-wysiwyg [role=menu]>[role=option][data-block=p] {
    font: normal normal 12px sans-serif;
}

#hc-wysiwyg [role=menu]>[role=option] {
    background: #fff;
    border: 0;
    border-radius: 0;
    color: inherit;
    display: block;
    height: auto !important;
    line-height: 1 !important;
    margin: 0;
    padding: 8px 20px;
    text-align: initial;
    white-space: nowrap;
}

[role=menu]>[role=option][aria-selected=true]::after {
    content: "✓";
    display: inline-block;
    margin-left: 20px;
    font: normal normal 12px sans-serif;
}
[dir=rtl] #hc-wysiwyg [role=menu]>[role=option][aria-selected=true]::after {
    margin-left: 0;
    margin-right: 20px;
}

/* Add focus styling to the button elements in the description text box toolbar on the new request page. */
#hc-wysiwyg [role=button]:focus {
    border: 1px solid rgba(12, 24, 202, 1);
}

/* Add focus styling to the submit-a-request CC text box and to its parent ul list. */
#request_collaborators_:focus {
    border-left: solid;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-width: 2px;
    border-left-color: #000;
}
#tehama-id-CC-field-list:focus-within {
    border: 1px solid rgba(12, 24, 202, 1);
}

/* Add boldness to the link text in the hint under the Subject text-box in the submit-a-request page, because the  */
/* color contrast between the link text and its surrounding text must be at least 3:1 (text-to-text) if there are  */
/* no other visible indications that this is a link (other than colour).                                           */
#request_subject_hint a {
    font-weight: bold;
}

/* Override the colour of the "CC" label in the just-created-request page's "Conversation" "Add email" text field */
/* in order to meet accessibility contrast requirements.                                                          */
ul[data-hc-pills-container] li:first-child>label {
    color: #595959;
}