/* ==========================================================================
   Announcements and Documents
   ========================================================================== */

   .announcements-container {
    overflow-y: hidden;
}

.announcement-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    padding: 10px;
}

.announcement-item:hover {
    transform: translateY(-5px);
}

.announcement-header {
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-header img {
    width: 24px;
    padding: 0;
    margin: -5px 5px;
}

.announcement-title {
    flex-grow: 1;
    margin-left: 10px;
}

.edit-button {
    margin-left: auto;
}

.announcement-content {
    padding: 10px;
    font-size: 14px;
    color: #333333;
    all: unset;
    display: block;
}

.announcement-footer {
    padding: 10px;
    background-color: #f1f1f1;
    text-align: right;
    font-size: 12px;
    color: #666666;
}

.scroll-buttons {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 103%;
    pointer-events: none;
}

.scroll-button {
    background-color: #484e55;
    color: #ffffff;
    border: none;
    padding: 10px;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.scroll-button:hover {
    background-color: #0056b3;
}

.documents-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.search-input {
    width: 100%;
    max-width: 800px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.total-documents {
    font-size: 1em;
    margin-bottom: 10px;
    color: #333;
}

.docscroll-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.docscroll-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.docscroll-button:hover {
    background-color: #0056b3;
}

.documents-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.document-item {
    width: calc(50% - 10px);
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.document-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.document-content,
.document-footer {
    margin-top: 5px;
    font-size: 0.9em;
    max-width: 65%;
}

.document-actions {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    justify-content: flex-end;
}

.iconButton,
.refreshIconButton,
.toggleIconButton,
.actionIconButton {
    cursor: pointer;
    margin-left: 10px;
    margin-right: 7px;
    width: 34px;
    height: 34px;
}

.refreshIconButton {
    position: absolute;
    top: 25px;
    right: 40px;
}

.toggleIconButton {
    position: absolute;
    right: 30px;
    top: 24px;
}

.emptyDataDiv {
    text-align: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.document-viewer {
    max-width: 80vw;
    max-height: 80vh;
    overflow: auto;
}

.document-viewer img {
    max-width: 100%;
    height: auto;
}

.document-viewer a {
    display: block;
    word-wrap: break-word;
    max-width: 100%;
}

.document-viewer {
    width: 100%;
    height: 100vh; /* Full viewport height for better mobile viewing */
    overflow: auto; /* Allow scrolling if content overflows */
    position: relative;
  }
  
  .pdf-iframe {
    width: 100% !important;
    height: 100% !important;
    border: none; /* Remove iframe border */
  }
  
  /* Mobile-specific styles */
  @media (max-width: 768px) { /* Adjust breakpoint as needed for mobile devices */
    .document-viewer {
      height: 90vh; /* Slightly less than full height to account for headers/footers */
    }
  
    .pdf-iframe {
      transform: scale(1.0); /* Adjust scale as needed for better readability */
      transform-origin: top left;
    }
  }
  
  /* Ensure the iframe scales with the viewport */
  .pdf-iframe {
    min-height: 800px; /* Maintain a minimum height for larger screens */
    max-height: calc(100vh - 60px); /* Adjust for any header/footer height */
  }


@media (max-width: 768px) {
    .document-item {
        width: 100%;
    }
}