/**
For the table with class "towers-view":
- Do not capitalize the table's header which is the default behaviour of the Corporate+ theme
- Make the table have a fixed width so that it occupies the same space than the attached view (map)
- Reduce cell padding to 8px
- Set cells to truncate content and add ellipsis when the content overflows the space. Also show the full contents when the user hovers over the content
- Center the footer and the pager below the table
- Do not highlight the column by which the table is sorted by default because the exposed sorting does remove this highlighting
**/

.towers-view {
    min-width: 720px;
}

.towers-view .views-table {
    table-layout: fixed;
    width: 100%;
}

.towers-view .views-table tr th {
    text-transform: none;
    font-size: 13px;
}

.towers-view .views-table tr td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.towers-view .views-table tr td,
.towers-view .views-table tr th {
    padding: 8px;
}

.towers-view .views-table tr td:hover {
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    word-break: break-all;
}

.towers-view .pager {
    display: flex;
    flex-flow: column wrap;
    align-items: center;
}

.towers-view .view-footer {
    text-align: center;
}

.towers-view td.is-active {
    background-color: transparent;
}

.region--gray-background {
    background-color: #dedede !important;
}


/*************************************

Overwrite the style of the code generated by Display Suite:
- For multiple value fields, show content as comma-separated list
- Solve a bug in the field label's format "inline"

*************************************/

.comma-separated-list {
    display: flex;
}

.comma-separated-list .field__label{
    white-space: nowrap;
}

.comma-separated-list .field__item {
    display: inline;
}

.field__item:not(:last-child)::after {
    content: ", ";
}

.field {
    clear: left;
}

.field--type-link {
    display: flex;
    align-items: center;
}

.field--type-link .field__item a {
    padding: 0;
}


/*************************************

Overwrite the style of the code generated by Field Group module in the node's page of the content type "Tower":

*************************************/

.tower-summary-contents {
    font-size: 14px;
    min-width: 600px;
}

.tower-summary-contents a {
    padding: 0;
    text-decoration: none;
}

.tower-summary-contents ul a {
    padding: 0.2em 1em;
}

.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
    border: 1px solid #333333;
    background: #333333;
}

.tab-subtitle h3 {
    text-align: center;
    font-weight: bold;
    margin: 1em 1em 1em 1em;
    font-size: 1.5em;
    color: #333333;
}

.tab-subtitle p {
    margin: 0 1em 0 1em;
    text-align: center;
}

.logos-list {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.logos-list img {
    height: 4em;
}


/*************************************

Overwrite homepage's slideshow

*************************************/

#block-slideshowfullwidth .tp-caption__title {
    font-size: 30px;
    padding: 40px;
    border: solid 3px lightgray;
}


/*************************************

Extend theme settings

*************************************/

.underlined,
.field-group--details a {
    text-underline-position: under;
    text-decoration: underline;
}

.field-group--details legend {
    margin-bottom: 1em;
}

.field-group--details {
    z-index: 1;
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    width: 280px;
}

.tower-summary-contents details {
    display: flex;
    flex-grow: 1;
}

.tower-summary-contents .detailsBox .details-wrapper {
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-grow: 1;
    min-width: 345px;
}

@media (max-width: 640px) {
    .tower-summary-contents .field-group--details {
        position: absolute;
    }
}
@media (min-width: 641px) {
    .tower-summary-contents .field-group--details {
        position: absolute;
        top: 45px;
        left: 236px;
    }
}

.tower-summary-contents .field-group--details .field__items,
.tower-summary-contents .field-group--details .field__item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tower-summary-contents .field-group--details .field__items:hover,
.tower-summary-contents .field-group--details .field__item:hover {
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    word-break: break-all;
}

.field--name-field-tower-geolocation {
    z-index: 0;
}

.field-group--details,
.tower-leaflet-map {
    border: solid 1px #ccc;
}


/*************************************

Extend geolocation leaflet module

*************************************/

.leaflet-control-attribution a {
    display: contents;
}


/*************************************

Overwrite the regions of the theme

*************************************/

.header__container {
    padding: 8px 0 8px;
}

#main-content .container {
    margin-top: 20px;
}

.main-content__section {
    padding-top: 0;
}

/*************************************

Style for plots displayed in TOWER SUMMARY page

*************************************/

.plot_image_wrapper{
    text-align: center;
}

.plot_image{
    max-height: 550px;
}

/*************************************

Responsive design for ACCESS THE DATA page

*************************************/

@media (min-width: 992px) {
    #block-gotoexposedfiltersblock {
        display: none;
    }
  }

@media (max-width: 991px) {
    #block-gotoexposedfiltersblock {
        display: block;
    }
  }


/**Show bug in BEF module that does not display the exposed form of the page "/access-the-data" in 2 columns
    Issue https://earth.bsc.es/gitlab/ess/tall-towers-website/-/issues/70 (BUG: Missing boundary filter and the label of some filter/sort widgets in the "Access the data" page)
*/

#views-exposed-form-towers-table-page-1 #edit-field-tower-geolocation-boundary-wrapper{
    width: 100%;
    border: none;
    padding: 0;
}
#views-exposed-form-towers-table-page-1 #edit-field-tower-geolocation-boundary-wrapper legend{
    display: none;
}
#views-exposed-form-towers-table-page-1 .js-form-item{
    width: 40%;
}

#views-exposed-form-towers-table-page-1 .js-form-item{
    margin: 7px 0;
    padding-right: 10px;
}

#views-exposed-form-towers-table-page-1 .js-form-item * {
    font-size: 14px;
}

#views-exposed-form-towers-table-page-1 .js-form-item label {
    font-size: 13px;
}

#views-exposed-form-towers-table-page-1.js-form-item input {
    height: 3.5em;
    font-size: 14px;}

#views-exposed-form-towers-table-page-1 .js-form-item select{
    margin: 0;
    height: 3.5em;
}

#views-exposed-form-towers-table-page-1 #edit-field-tower-geolocation-boundary-wrapper .js-form-item{
    width: 20%;
}

#views-exposed-form-towers-table-page-1 .form--inline,
#edit-field-tower-geolocation-boundary-wrapper .fieldset-wrapper{
    display: flex;
    flex-wrap: wrap;
}

.towers-view .view-filters {
    width: 33.33333333%;
    float: left;
}
.towers-view .tower-leaflet-map,
.towers-view .view-content,
.towers-view .pager,
.towers-view .view-footer{
    width: 66.66666667%;
}

.towers-view .pager, .towers-view .view-footer{
    float: right;
}

.towers-view .tower-leaflet-map, .towers-view .view-content{
    float: left;
}

.towers-view .tower-leaflet-map .view-content{
    width: 100%;
}
#views-exposed-form-towers-table-page-1 .form-actions{
    width: 48%;
    margin: auto;
}
.eu-cookie-compliance-banner{
    background-color: #364D51 !important;
    min-height: 115px;
}

.eu-cookie-compliance-message {
    padding: 2rem;
}

.eu-cookie-compliance-buttons{
    float:right;
}

.eu-cookie-compliance-content #popup-buttons button{
    background-image: linear-gradient(to bottom,#ededed 5%,#dfdfdf 100%);
    box-shadow: inset 0 1px 0 0 #ffffff;
    background-color: #ededed;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    margin-top: 1em;
    vertical-align: middle;
    overflow: visible;
    width: auto;
    cursor: pointer;
    font-family: Arial,sans-serif;
    font-weight: bold;
    padding: 4px 8px;
    text-decoration: none;
    text-shadow: 1px 1px 0 #ffffff;
    color: #000;
    margin-right: 10px;
}

