/* Styl bazowy */
:root {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

body {
    margin-top: 0;
    padding-bottom: 70px;
}

/* Przyciski */
button, .lbtn, #closePopup {
    padding: 10px 20px;
    background-color: #faa731;
    color: black;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
}

button:hover,
.lbtn:hover,
#closePopup:hover {
    background-color: #e69b2d;
}

#closePopup {
    margin: 20px auto;
}


.lbtn:active {
    background-color: #d38b25;
}

/* Komunikat o ładowaniu */
.loading-message {
    color: #faa731;
    font-weight: bold;
    display: none;

    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff8e1;
    border: 1px solid #faa731;
    padding: 10px 20px;
    font-weight: bold;
    color: #faa731;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    display: none;
    z-index: 2000;
    border-radius: 5px;
}






/* Wyniki */
.result {
    margin-top: 20px;
}

.result ul {
    list-style-type: none;
    padding: 0;
}

.result li {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    cursor: pointer;
}

/* Typy serwisów */
.MapServer {
    background-color: #faebd7;
}

.FeatureServer {
    background-color: #d1eaf5;
}

.ImageServer {
    background-color: #d0f5c1;
}

.GPServer {
    background-color: #f4e7de;
}

/* Foldery */
.folder-title {
    font-weight: bold;
    margin-top: 20px;
	background-color: #faa731;	
}



/* Obsługa hamburger-menu */
@media (max-width: 980px) {
  .links {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    background-color: #faa731;
    padding: 10px;
    border-radius: 5px;
  }

  .links.show {
    display: flex;
  }

  .navbar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0 10px;
  }
}

/* Na desktopie */
.links {
  display: flex;
  gap: 20px;
}




/* Popup */
#popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* background-color: #fdfdfd !important; */
    padding: 20px;
    border: 2px solid #faa731;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    overflow-x: hidden;
/* } */
/* #popup { */
    /* display: flex; */
    flex-direction: column;
    align-items: center;
}


#popupContent {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    margin-bottom: 20px;
}

#popupContent th {
    position: sticky;
    top: 0;
    background-color: #faa731;
    color: black;
    padding: 8px;
    border: 1px solid #ccc;
    text-align: center;
    z-index: 1;
}

#popupContent td {
    background-color: #f9f9f9;
    padding: 8px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
}

#popup h2 {
    margin-top: 0;
}

#errorMessage {
    color: red;
    font-weight: bold;
}

/* Tabele */
table {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #faa731;
    color: black;
    text-align: center;
}

td {
    border: 1px solid #ddd;
}

.td_vL {
    max-height: 3em;
    overflow-y: auto;
    white-space: normal;
    word-wrap: break-word;
    background-color: red;
}

.td_v, .td_l {
    padding: 8px;
    border: 1px solid #ccc;
    text-align: left;
}

.td_nw {
    white-space: nowrap;
}

/* Nagłówek strony (burger + logo + menu) */
.header-bar {
    background-color: #faa731;
    display: grid;
    grid-template-columns: repeat(2, auto);
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    text-shadow: 0 -1px 0 aliceblue;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
}

.title {
    font-size: 1.5em;
    font-weight: bold;
}

.links {
    display: flex;
    gap: 20px;
}

.links a {
    color: black;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
}

.links a:hover {
    text-decoration: none;
}

/* Przycisk burgera */
.navbar-toggle {
    display: none;
    font-size: 1.8em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 10px;
}



/* Dla dostępności */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

/* Stopka */
.footer {
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    position: fixed;
    width: 100%;
    bottom: 0;
	underline:none;
}

.footer a,
.footer a:link,
.footer a:visited,
.footer a:hover,
.footer a:active {
    text-decoration: none;
    color: #800;
}

#cpyr {
    background-color: #f4f4f4;
    color: #f4f4f4;
}


.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 5px 0;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 980px) {
    .header-bar {
        grid-template-columns: auto auto;
    }

    .navbar-toggle {
        display: block;
    }

    .links {
        display: none;
        grid-column: span 2;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .links.show {
        display: flex;
    }
}

/* #popup[style*="display: block"] { */
    /* display: flex !important; */
    /* flex-direction: column; */
    /* align-items: center; */
/* } */


#closePopup {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
