@font-face {
    font-family: "DepartureMono";
    src: url("./fonts/DepartureMono-Regular.otf");
}

:root {
    width: 100%;
    height: 100%;

    background-color: black;
    background-image: url("./images/styling/background_space.png");
    color: whitesmoke;

    font-family: "DepartureMono";
}

html {
    display: table;
    margin: auto;
    max-width: 100%;
    overflow-x: clip;
}

body {
    display: table-cell;
    max-width: 1200px;
    overflow-x: hidden;
    touch-action: pan-y;
}



/*-- ================================================ --->
<---                 GENERAL CLASSES                  --->
<--- ================================================ --*/
.hidden {
    display: none !important;
}

.horizontal-group {
    display: flex;
}




/*-- ================================================ --->
<---                    TITLE BAR                     --->
<--- ================================================ --*/
#titlebar {
    width: 100%;
    height: fit-content;
    padding: 20px 0;
    
    color: black;
    font-weight: bold;
    font-size: 45px;
    text-align: center;

    /* border: 10px solid #BA5F06; */
    background: linear-gradient(to bottom,
        #FEE571 0% 15%,
        #FAB402 30% 45%,
        #DB7802 60% 75%,
        #AF4C00 90% 100%
    );

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#titlebar img {
    height: 57px;
}

marquee {
    width: 110%;
    

    margin-bottom: 10px;
    margin-left: -1%;
    margin-right: -1%;
    padding: 5px 0;

    border: outset;
    background-color: black;
    /* background-color: #0226B2; */
}

#counter-container {
    margin-bottom: 10px;
}
.counter {
    text-align: center;
    /* color: #1544ff; */
}



/*-- ================================================ --->
<---                    MAP VIEW                      --->
<--- ================================================ --*/
#map-container {
    position: relative;
    border: 2px black solid;
    border-radius: 5px;
    user-select: none;
    -webkit-user-select: none;
    width: 75%;
    border: outset;
}

#map-svg {
    width: 100%;
    height: 100%;
    margin: auto 0;
    background-color: #1E1E1E;
    user-select: none;
    cursor: grab;
    overscroll-behavior: contain;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#overlay-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;

    /* background-color: transparent;
    border: none; */
    background-color: #c0c0c0;
    border-radius: 1px;
    padding: 5px 8px;
    

    font-weight: bold;
    cursor: pointer;


    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
}
#overlay-btn:active,
#overlay-btn:disabled {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

#cursor-text {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgb(211, 211, 211);
    opacity: 80%;
    
    padding: 1px 2px;
    border: 2px solid gray;
    border-radius: 3px;
    font-size: 14px;
    color: black;

    z-index: 3;

    pointer-events: none;
}

.country {
    fill: #A63E3F;
    fill: #d4393c;
    fill-opacity: "1";
    stroke: black;
    stroke-width: 1;
    stroke-opacity: "1";
    stroke-linejoin: "round";
    cursor: pointer;
    transition: fill 0.3s ease;
    opacity: "1";
    cursor: pointer;
    paint-order: fill stroke;
}
.thin-stroke {
    stroke-width: 0.25;
}

.country:hover {
    fill: #863133;
}
.country:hover + #cursor-text {
    display: block;
}

.pointer-cursor:hover {
    cursor: pointer;
}

.visited {
    fill: #3FAA40;
    fill: #32d635;
}
.visited:hover {
    fill: #3d8c40;
}



/*-- ================================================ --->
<---                   TABLE VIEW                     --->
<--- ================================================ --*/
#countries-group {
    padding: 0 10%;
    gap: 20px;
    margin-bottom: 10px;
    max-height: 60vh;
}

#table-container {
    overflow-y: scroll;
    min-height: 250px;
    width: 25%;

    display: flex;
    justify-content: center;
    border: outset;
    background-color: black;

    color: #FDFB50;
    /* color: #A63E3F; */
    /* color: #3FAA40; */
}

#countries-table {
    width: 100%;
}

#countries-table th {
  position: sticky;
  top: 0;
  z-index: 1;

  color: #161616;
  background-color: #FDFB50;
}
td, th {
    padding: 0 20px;
}
tr {
    margin-top: 10px;
    background-color: #1E1E1E;
}
#countries-table td:first-child {
    width: 60%;
}
#countries-table td:last-child {
    width: 40%;
}

.country-entry {
    cursor: pointer;
}



/*-- ================================================ --->
<---                   INFO GROUP                     --->
<--- ================================================ --*/
#photos-group {
    padding: 0 10%;
    gap: 20px;
    margin-bottom: 50px;
}

#info-container {
    width: 20%;
}

#info-box {
    padding: 20px 0;
}

#primary-info-box {
    margin-top: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

#error-info-box {
    text-align: center;
    font-size: 15px;
    color: #ee3b3e;
}

#flag-container {
    display: none;
    width: 133px;
    height: 100px;
    margin: 0 auto;
    border: outset;
}

.fun-facts {
    display: flex;
    flex-direction: column;
    text-align: center;
    font-style: italic;
}
.capital, .language, .population {
    margin-top: 12px;
    text-decoration: underline;
    font-weight: bold;
    font-style: normal;
}

#cities-container {
    display: none;
}

#cities-table {
    width: 100%;
    margin-top: 16px;
    border: outset;
    background-color: black;
}

#cities-table th {
    background-color: #0f0f0f;
}

.city-entry {
    cursor: pointer;
    text-decoration: underline;
}



/*-- ================================================ --->
<---                   PHOTO VIEW                     --->
<--- ================================================ --*/
#photos-container {
    width: 80%;
    min-height: 300px;
}

.city-divider {
    flex-basis: 100%;
    font-size: 24px;
    border-bottom: 2px dashed whitesmoke;
    margin-bottom: 15px;
}

.country-photos {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 10px;
    padding: 1% 2%;
}

.photo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    
    padding: 15px 0px; 
    margin-bottom: 20px;

    background-color: #f2f2f2;
    border: 2px solid #e2e0d2;
    border-radius: 6px;

    width: 270px;
    height: fit-content;
    min-height: 332px;
}
.photo {
    max-width: 224px;
    max-height: 300px;

    border: inset;

    user-select: none;
}
.photo-caption {
    text-align: center;
    font-style: italic;

    color: #161616;
    font-size: 14px;
}



/*-- ================================================ --->
<---                    SCROLLBAR                     --->
<--- ================================================ --*/
::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}
::-webkit-scrollbar-button {
    width: 18px;
    height: 18px;
    background-color: #c0c0c0;
    box-shadow: inset 1px 1px 0 1px #ffffff,
                inset -1px -1px 0 1px #404040;
}
::-webkit-scrollbar-thumb {
    background-color: #B9B6BB;

    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;

    z-index: 1;
}
::-webkit-scrollbar-track {
    background-color: #e0e0e0;
    box-shadow: inset 1px 1px 0 1px #808080,
                inset -1px -1px 0 1px #ffffff;
}
::-webkit-scrollbar-button:vertical:decrement {
    background:
        linear-gradient(120deg, #c0c0c0 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(240deg, #c0c0c0 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(0deg, #c0c0c0 30%, rgba(0, 0, 0, 0) 31%);
    background-color: black; /* arrow color */
}
::-webkit-scrollbar-button:vertical:decrement:active {
    box-shadow: inset 1px 1px 0 1px #404040,
                inset -1px -1px 0 1px #ffffff;
}
::-webkit-scrollbar-button:vertical:increment {
    background:
        linear-gradient(300deg, #c0c0c0 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(60deg, #c0c0c0 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(180deg, #c0c0c0 30%, rgba(0, 0, 0, 0) 31%);
    background-color: black; /* arrow color */
}
::-webkit-scrollbar-button:vertical:increment:active {
    box-shadow: inset 1px 1px 0 1px #404040,
                inset -1px -1px 0 1px #ffffff;
}
::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:increment,
::-webkit-scrollbar-button:horizontal:end:decrement {
  display: none;
}



@media(max-width: 1250px) {
    #countries-group,
    #photos-group {
        padding: 0 2%;
    }
}

@media(max-width: 950px) {
    .horizontal-group {
        flex-direction: column;
        justify-content: flex-start;
    }
    #countries-group {
        flex-direction: column-reverse;
        justify-content: flex-end;
        height: auto; 
        min-height: max-content;
    }

    #table-container {
        max-height: 300px;
    }

    #map-container,
    #table-container,
    #info-container,
    #photos-container {
        width: 100%;
    }

    .country-photos {
        display: flex;
        justify-content: center;
        text-align: center;
    }
}