/* HSV Sint Walrick Style */

.hidden {
    display: none;
}

/* Header */
.header {
    display: flex;
    justify-content: center; /* center nav/logo */
    align-items: center;
    position: relative; /* needed for absolute positioning of profile */
    background-color: #6c757d;
    color: white;
    padding: 15px 20px;
    height: 80px;
}

/* Logo */
.header-logo {
    position: absolute;
    left: 10px;
}

.header-logo img {
    height: 50px;
}

/* Profile button stays at upper-right corner */
.header-profile {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #adb5bd;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
}

.header-profile img {
    height: 40px;
    margin-right: 8px; /* optional if you have a profile image + text */
}

.header-profile:hover {
    background: #343a40;
}

.nav {
    justify-content: center;
    position: absolute;
    left: 45%;
    color: ffffff;
    padding: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 16px;
}

nav a:hover {
    background: #343a40;
    border-radius: 5px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Helvetica', sans-serif;
    color: #343a40;
}

p {
    font-family: 'Georgia', serif;
    line-height: 1.6;
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    color: white;
    text-align: center;
    transition: background 0.3s ease;
}

.button-primary {
    background: #0073e6;
}

.button-primary:hover {
    background: #005bb5;
}

.button-secondary {
    background: #28a745;
}

.button-secondary:hover {
    background: #218838;
}

.button-danger {
    background: #dc3545;
}

.button-danger:hover {
    background: #c82333;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-backdrop {
    z-index: 999 !important; /* Make sure backdrop is correctly behind the modal */
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 50%;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    text-align: center;
}



.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.mb-3 {
    margin-bottom: 10px;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    color: #003366;
    margin-bottom: 20px;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background: #0073e6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-container button:hover {
    background: #005bb5;
}

/* Layout & Spacing */
.container {
    width: 80%;
    margin: auto;
    padding: 20px;
}

/* Footer */
footer {
    background: #003366;
    color: white;
    text-align: center;
    padding: 10px;
    position: relative;
    bottom: 0;
    width: 100%;
}

/*Testing space */

.image-container {
  position: relative;
  display: inline-block;
  	position: absolute;
	left: 90%;
}

.hover-image {
  width: auto; /* Adjust the size of the image */
	height: 50px;

}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  z-index: 1;
}

.image-container:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: black;
}

.dropdown-menu a:hover {
  background-color: #ddd;
}

.dropdown-item {
    display: block; /* Make both behave like block elements */
    width: 100%; /* Full width */
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    text-decoration: none;
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

button.dropdown-item {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: black;
  outline: none;
}

button.dropdown-item:hover {
  background-color: #ddd;
}


/* ==============================
   Mobile Responsive Styles
============================== */
@media (max-width: 768px) {
    /* Header */
    .header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px;
    }

    .header-logo {
        position: relative;
        left: 0;
        margin-bottom: 10px;
    }

    .header-profile {
        position: relative;
        left: 0;
        margin-top: 10px;
    }

    .nav {
        position: relative;
        left: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 5px 0;
    }

    nav a {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Container */
    .container {
        width: 95%;
        padding: 10px;
    }

    /* Tables */
    table {
        width: 100%;
        font-size: 14px;
    }

    th, td {
        padding: 6px 8px;
    }

    /* Buttons */
    .btn, .button {
        font-size: 14px;
        padding: 6px 10px;
    }

    /* Modal */
    .modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 15px;
    }

    /* Login container */
    .login-container {
        width: 90%;
        margin: 30px auto;
        padding: 15px;
    }

    /* Image dropdown */
    .image-container {
        left: auto;
        position: relative;
        display: block;
        margin-top: 10px;
    }

    .hover-image {
        width: 40px;
        height: auto;
    }

    /* Dropdown menu */
    .dropdown-menu {
        position: relative;
        min-width: 100%;
    }
    .modal-content {
        width: 80%;
        margin: 10% auto;
        padding: 15px;
    }

    .modal-header h5 {
        font-size: 18px;
    }

    .modal-body input,
    .modal-body select,
    .modal-body button {
        font-size: 16px;
        padding: 12px;
    }

    .btn {
        width: 100%; /* full width buttons on smaller screens */
        margin-bottom: 10px;
    }
}

/* Extra small screens (iPhones, small Androids) */
@media (max-width: 480px) {
    h1, h2, h3 {
        font-size: 18px;
    }

    nav a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .btn, .button {
        font-size: 12px;
        padding: 5px 8px;
    }

    .header-logo img,
    .header-profile img {
        height: 40px;
    }

    .login-container h2 {
        font-size: 20px;
    }
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 10px;
        border-radius: 5px;
    }

    .modal-header h5 {
        font-size: 16px;
    }

    .modal-body input,
    .modal-body select,
    .modal-body button {
        font-size: 14px;
        padding: 10px;
    }
}

/* Default for desktops */
#docModal .modal-dialog {
    margin-top: 5vh !important;
}

#docModal iframe {
    height: 75vh !important;   /* large iframe for desktop */
}

/* Tablets (portrait and landscape) */
@media (max-width: 1024px) {
    #docModal .modal-dialog {
        margin-top: 4vh !important;
        width: 95% !important; /* give more space on tablets */
    }

    #docModal iframe {
        height: 65vh !important;
    }
}

/* Phones */
@media (max-width: 768px) {
    #docModal .modal-dialog {
        margin-top: 2vh !important;
        width: 98% !important;
    }

    #docModal iframe {
        height: 50vh !important;  /* smaller height for mobile */
    }
}

/* Make document table fixed width layout */
#documentsTable {
    table-layout: fixed;
    width: 100%;
}

/* Prevent column resize when filtering */
#documentsTable th,
#documentsTable td {
    overflow: hidden;      /* cut off extra text */
    text-overflow: ellipsis; /* add "..." for long text */
    white-space: nowrap;   /* keep text on one line */
}

/* Example column widths – adjust as needed */
#documentsTable th:nth-child(1),
#documentsTable td:nth-child(1) {
    width: 35%; /* Title */
}

#documentsTable th:nth-child(2),
#documentsTable td:nth-child(2) {
    width: 20%; /* Category */
}

#documentsTable th:nth-child(3),
#documentsTable td:nth-child(3) {
    width: 15%; /* Year */
}

#documentsTable th:nth-child(4),
#documentsTable td:nth-child(4) {
    width: 15%; /* Publish Date */
}

#documentsTable th:nth-child(5),
#documentsTable td:nth-child(5) {
    width: 15%; /* Actions */
}
#documentsTable {
    table-layout: fixed;
    width: 100%;
}

#documentsTable th,
#documentsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
