/* Body styling */
body {
    background-color: #232326; /* Fallback color */
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

/* Container for the items */
#itemsContainer {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
}

.item {
    background-color: #303033;
    padding: 10px;
    padding-left: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100px;
    margin: 10px 0; /* Centering vertically */
    max-width: 700px; /* Optional: Limit max width */
	  -webkit-animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	 animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@-webkit-keyframes flip-in-hor-bottom {
  0% {
    -webkit-transform: rotateX(80deg);
            transform: rotateX(80deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
    opacity: 1;
  }
}
@keyframes flip-in-hor-bottom {
  0% {
    -webkit-transform: rotateX(80deg);
            transform: rotateX(80deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
    opacity: 1;
  }
}


/* Wrapper for item content */
.item-content-wrapper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.item-title-wrapper {
    flex: 1; /* Ensures the title occupies the first column */
}

.item-description-wrapper {
    flex: 2; /* Description takes more space in the second column */
}

/* Date and time container */
.item-date-container {
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  height: 25px;
  border: none;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
}

.subtitle-container {
    margin-top: 10px; /* Adds space between the description and subtitles */
}

.item-subtitle {
    display: block; /* Ensures each subtitle is displayed on its own line */
    color: #007bff; /* Subtitle text color */
    font-size: 18px; /* Adjust font size for subtitles */
    margin-top: 5px; /* Adds some space between each subtitle */
    text-decoration: none; /* Removes underline */
    transition: color 0.3s ease-in-out;
}

.item-subtitle:hover {
    color: #0056b3; /* Darker blue color on hover */
    text-decoration: underline; /* Underline on hover for better visibility */
}

/* Date styling */
.item-date {
    font-size: 14px;
    color: #bbb;
}

/* Time styling */
.item-time {
    font-size: 12px;
    color: #999;
}

/* No results message */
.no-results-message {
    text-align: center;
    font-size: 18px;
    color: white;
    padding: 20px;
    background-color: #1f1f1f;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 20px;
}

/* Box for the icon/image */
.box {
    width: 45px;
    height: 45px;
    border-radius: 5px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    margin-right: 10px;
    animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

/* Content styling */
.item-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* Title styling */
.item-title {
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Description styling */
.item-description {
    max-width: 85%;
    color: #bbb;
    margin-top: 10px;
}

.load-more-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.load-more-button:hover {
    background-color: #45a049;
}

.load-more-button:active {
    background-color: #388e3c;
}

/* Loading spinner container */
#dbspinner-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 15px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 9999;
}

/* Spinner animation */
.dbspinner {
    width: 16px;
    height: 16px;
    border: 3px solid white;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* General spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 40%;
    left: 35%;
    transform: translate(-50%, -50%);
    display: none;
}

/* Spinner animation keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search container */
.search-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: auto;
}

/* Search box styling */
.search-box {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: none;
    border-radius: 25px;
    background-color: #1f1f1f;
    color: white;
    font-size: 16px;
    transition: background-color 0.3s;
}

/* Search box placeholder */
.search-box::placeholder {
    color: #888;
}

/* Focused search box */
.search-box:focus {
    outline: none;
    background-color: #333;
    box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.2);
}

/* Clear button */
#clearButton {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: white;
    display: none;
}

/* Hover effect for clear button */
#clearButton:hover {
    color: #ff4d4d;
}

/* Search count */
#searchcount {
   padding-bottom: 5px;
}

/* Error message */
#errorMessage {
    color: red;
    margin: 40px 20px 0;
    text-align: center;
    font-size: large;
}

/* Info button */
.open-modal-btn {
   width: 30px;
   height: 30px;
   cursor: pointer;
   margin-bottom: 5px;
   background-color: #3B358B;
   -webkit-mask: url('/icons/infoicon.svg');
   mask: url('/icons/infoicon.svg');
   mask-size: contain;
   float: right;
}

/* Modal overlay */
.modal-overlay {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.5);
   backdrop-filter: blur(10px);
   z-index: 1000;
}

/* Modal box */
.modal-box {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   width: 600px;
   background: #303033;
   padding: 20px;
   border-radius: 10px;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
   text-align: center;
}

/* Close modal button */
.close-modal-btn {
   background: red;
   color: white;
   border: none;
   padding: 8px 15px;
   cursor: pointer;
   border-radius: 5px;
   margin-top: 15px;
}

/* Hover effect for close modal button */
.close-modal-btn:hover {
   background: darkred;
}

/* Responsive Design */
@media (min-width: 450px) {
    .modal-box {
        width: 90%;
  }
    .item {
        width: 99%;
    }  
}

@media (min-width: 768px) {
    .item {
        width: 60%;
    }
    .item-description {
        max-width: 98%;
    }
    .modal-box {
       width: 600px;
  }
    #searchcount {
       padding-bottom: 10px;
  }
}

