.tender-container *:focus-visible {
    outline: none;
}

.tender-container button:focus {
    outline: none;
    background-color: #3f4e61;
    color: white !important;
}

.tender-container [type="button"]:focus,
.tender-container [type="button"]:hover {
    outline: none;
}

.tender-container [type="button"]:focus-visible {
    outline: none;
    background-color: #3f4e61;
}

.tender-container p {
    margin-block-end: 0;
}

.tender-container {
    background-color: #fafafafa;
    font-family: "Poppins", "Roboto", sans-serif !important;
}

/* #region Utils */

.width-p100 {
    max-width: 100%;
}

.width-225 {
    width: 225px;
}

.width-465 {
    width: 465px;
}

.margin-top-20 {
    margin-top: 20px;
}

.margin-bottom-20 {
    margin-bottom: 20px;
}

.margin-top-39 {
    margin-top: 39px;
}

.margin-bottom-39 {
    margin-bottom: 39px;
}

.tender-container .semi-bold {
    font-weight: 500;
}

.color-dark-blue {
    color: #3f4e61;
}

.color-white {
    color: #fafafafa;
}

.flex-1 {
    flex: 1;
}

.display-none {
    display: none;
}

.display-ib {
    display: inline-block;
}

.error-message {
    margin: 10px 0;
    color: #7e3232;
    font-weight: bold;
    font-size: 14px;
}

.tender-open {
    transform: rotate(180deg);
}

/* #endregion Utils */

/* #region Search Form section */

.tender-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.tender-container .title {
    margin-bottom: 20px;
    font-size: 29px;
    font-weight: 700;
    color: #3f4e61;
}

.search-form {
    display: flex;
    flex-direction: column;
    column-gap: 20px;
    row-gap: 10px;
    margin-bottom: 20px;
}

.search-form label {
    display: block;
    font-weight: bold;
}

.search-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-form button {
    padding: 10px 30px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
}

.search-form .search {
    background-color: #3f4e61 !important;
}

.search-form .reset {
    background-color: #5b708a !important;
}

.container-input {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.tender-container .row {
    display: flex;
    flex-direction: row;
    column-gap: 60px;
}

.first-row-input {
    flex: 35%;
}

.second-row-input {
    flex: 60%;
}

.first-row-input label {
    flex: 0 0 22%;
    font-size: 19px;
}

.first-row-input input {
    flex: 1;
}

.second-row-input label {
    flex: 0 0 19%;
    font-size: 19px;
}

.second-row-input input {
    flex: 1;
}

.container-button-form {
    grid-column: span 2;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.container-button-search-form {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;

}

.container-button-search-form button:hover {
    background-color: rgba(50, 60, 79, 1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    color: #fff !important;
}
/* #endregion Search Form section */

/* #region Results section */

.header-row,
.cell-row {
    display: flex;
    gap: 3px;
}

.header,
.cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

#cig-header,
.cig-cell {
    flex: 0 0 12%;
    text-align: center;
}

#object-header,
.object-cell {
    flex: 2;
}

.object-cell,
.data-cell,
.institution-cell,
.link-cell,
.cig-cell {
    overflow-wrap: anywhere;
}

#institution-header,
.institution-cell {
    flex: 1;
}

#link-header,
.link-cell {
    flex: 1;
}

#data-header,
.date-cell {
    flex: 1 0 14%;
}

.date-cell {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.cig-content,
.institution-content,
.bdncp-content {
    font-size: 14px !important;
    font-weight: 500;
}
.subject-content {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* Tooltip styles */
.subject-content::before {
    content: attr(data-full-text);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    white-space: pre-wrap;
    width: max-content;
    max-width: 500px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s;
    display: none;
}

.subject-content:hover::before {
    opacity: 1;
    visibility: visible;
    display: block;
}

.dates-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.tender-container .header {
    font-size: 18px;
    font-weight: 500;
    background-color: #3f4e61;
    color: #fff;
    padding: 10px;
}

.dropdown-content,
.dropdown-content-header {
    display: flex;
    flex: 1;
    gap: 3px;
}

.cell {
    padding: 10px;
}

.no-results {
    text-align: center;
    background-color: #f8f8f8;
    padding: 10px;
    font-weight: 500;
}

.cell-row:nth-child(odd) .cell {
    background-color: #f3f3f3;
}

.cell-row:nth-child(even) .cell {
    background-color: #f8f8f8;
}

.cell a {
    color: #53575d;
}

.cell a:hover {
    color: #46648b;
    text-decoration: underline;
}

.cell-title {
    display: none;
}

.cig-title-cell,
.font-title-cell {
    font-size: 18px;
    font-weight: 600;
}

.cell button {
    background-color: unset;
    border: none;
    display: none;
    outline: none;
}

.dropdown-trigger > img {
    pointer-events: none;
    min-width: 20px;
}

.cig-content,
.institution-content,
.bdncp-content {
    font-size: 16px;
    font-weight: 500;
    color: #53575d;
}

.institution-content {
    text-transform: uppercase;
}

.date-content {
    font-size: 14px;
    font-weight: 400;
}
.date-content-span {
    color: #53575d;
}
.date-title-span {
    color: #53575d;
}

.subject-content {
    font-size: 14px !important;
    font-weight: 500;
}

.object-cell {
    justify-content: flex-start;
}

.subject-content:hover,
.bdncp-content:hover {
    text-decoration: underline;
}

.nd-content {
    font-size: 14px;
    font-weight: 500;
    color: #b2b4b8;
    align-self: center;
}

/* #endregion Results section */

/* #region Arrow */

.buttons-container-start {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.arrow-container-start,
.arrow-container-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.arrow-container-start {
    width: 50%;
    align-self: end;
}

.arrow-container-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    border: none;
    background-color: rgba(243, 243, 243, 1) !important;
}

.arrow-container-button:hover {
    background-color: rgba(233, 233, 233, 1) !important;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.arrow-container-button:disabled {
    background-color: rgba(243, 243, 243, 0.5) !important;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.5;
}

.arrow-container-button:focus {
    background-color: rgba(243, 243, 243, 0.5) !important;
    opacity: 0.8;
}

/* #endregion Arrow */

@media (max-width: 992px) {
    /* #region Util for Media Query */

    .color-withe {
        color: #fafafa !important;
    }

    .hide-container-920 {
        display: none;
    }

    .display-block {
        display: block !important;
    }

    /* #endregion Util for Media Query */

    /* #region Search Form Media Query */
    .search-form {
        column-gap: 0;
        row-gap: 20px;
    }

    .container-input {
        display: block;
    }

    .first-row-input label,
    .second-row-input label {
        flex: initial;
        max-width: 100%;
        margin-bottom: 5px;
    }

    .first-row-input input,
    .second-row-input input {
        flex: initial;
        max-width: 100%;
    }

    .container-button-search-form {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-start;
        gap: 10px;
    }

    /* #endregion Search Form Media Query */

    /* #region Results Grid Media Query */

    .cell-row {
        font-size: clamp(0.8rem, 1vw, 3rem);
    }

    .header-row {
        display: none;
    }

    .cell-row {
        display: flex;
        flex-direction: column;
    }

    .cell {
        flex: 1 1 30%;
        align-items: normal;
        box-sizing: border-box;
        padding: 10px;
        text-align: left;
        justify-content: unset;
    }

    .cell {
        display: flex;
    }

    .font-title-cell {
        font-size: 14px;
        font-weight: 500;
    }

    .cell:not(:last-child) {
        margin-bottom: 2px;
    }

    .institution-cell,
    .date-cell,
    .link-cell {
        justify-content: flex-start;
    }

    .cell a {
        color: #53575d;
        flex: 1;
    }

    .cell a:hover {
        color: #46648b;
    }

    .cell-title {
        display: block;
        flex: 0 0 clamp(16%, 11vw, 19%);
        color: #bebebe;
        font-weight: bold;
        max-width: 100px;
    }

    .cell-title p {
        margin-right: 4px;
    }

    .cell button {
        display: inline-block;
    }

    .link-cell {
        text-decoration: unset;
    }

    .link-cell a {
        text-decoration: underline;
        color: #46648b;
        text-transform: uppercase;
    }

    .institution-cell a {
        text-transform: uppercase;
    }

    .cig-cell {
        background-color: #3f4e61 !important;
        color: #fff;
        font-weight: bolder;
        font-size: clamp(0.8rem, 4vw, 1.5rem);
        align-items: center;
        padding: 20px;
        text-align: left;
    }

    .cig-cell .flex-1 p {
        margin-left: -10px;
    }

    .dropdown-content {
        display: block;
        flex: unset;
        max-height: 0px;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .dropdown-content.display-block {
        max-height: 90vh;
    }

    .arrow-container-start,
    .arrow-container-end {
        display: flex;
        justify-content: flex-end;
    }

    .arrow-container-start div,
    .arrow-container-end div {
        width: 30px;
        height: 30px;
        background-color: #f3f3f3 !important;
    }

    .object-cell,
    .institution-cell {
        flex-direction: row;
    }

    .link-cell {
        min-width: max-content;
    }

    .subject-content {
        font-size: 14px;
        font-weight: 400;
    }

    /* #endregion Results Grid Media Query */
}

@media (max-width: 596px) {
    .row {
        flex-direction: column !important;
        row-gap: 35px;
    }

    .first-row-input label,
    .second-row-input label {
        margin-bottom: 20px;
    }

    .date-cell {
        display: flex;
        flex-direction: column;
    }

    .date-cell .cell-title {
        display: none;
    }

    .object-cell,
    .institution-cell {
        flex-direction: column;
    }

    .date-cell .cell-title,
    .link-cell .cell-title {
        flex-basis: max-content;
    }

    .cig-cell .flex-1 p {
        margin-left: 20px;
    }

    .container-button-form {
        display: flex;
        flex-direction: column-reverse;
        align-items:  end;
        gap: 30px;
    }

    .pdf-export-button-container {
        flex-direction: row-reverse;
    }
}

/* #region Search Summary */

div.search-form .row.hidden,
.search-settings.hidden,
.search-settings .pill.hidden,
#nofilters-pill.hidden {
    display: none;
}

div.search-settings {
    padding: 10px;
    padding-top: 0 !important;
    border-bottom: 1px solid #aaa9;
    margin-bottom: 20px;
}

div.search-settings h5 {
    color: #32354d;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: -5px;
}

div.search-settings .search-pills {
    display: flex;
    flex-wrap: wrap;
    column-gap: 15px;
    row-gap: 12px;
    margin-bottom: 12px;
}

div.search-settings .search-pills div {
    color: #32354d;
    font-size: 12px;
    padding: 4px 18px;
    border-radius: 18px;
    background-color: #f3f3f3;
    font-weight: 400;
}

div.search-settings .search-pills div b {
    text-transform: uppercase;
    font-weight: 500;
}
/* #endregion Search Summary */
.tender-search-spinner,
.tender-pdf-spinner {
    position: static;
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3c434a;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}

.pdf-export-button-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#pdf-export  {
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    background-color: #fafafa;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.25);
    border: none;
    color: #3f4e61;
}

#pdf-export:hover {
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

#pdf-export:focus {
    color: #fff;
    background-color: #c36;
    text-decoration: none;
}

.tender-search-spinner.hidden {
    display: none;
}

.tender-pdf-spinner.hidden {
    display: none;
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
    }
}
@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
    }
}
.results-count-message {
    color: #53575d;
    font-size: 14px;
    width: 50%;
    align-self: center;
}

#input-institution {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

#input-institution:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

#input-institution option {
    padding: 8px;
}
