.tag-view-container {
    display: flex;
    gap: 20px; /* Adds space between left and right columns */
}

.left {
    width: 300px;
}

.right {
    width: 100%;
}

.edit_button {
    background-color: rgba(173, 216, 230, 0.1);
    color: lightblue;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.edit_button:hover {
    background-color: rgba(173, 216, 230, 0.2);
}

.tag-meta {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.meta-separator {
    margin: 0 10px;
}

.tag-title {
    margin-top: 0px;
    margin-bottom: 10px;
    font-size: clamp(1.2rem, 8vw, 2em);
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tag_edit_form {
    max-width: 600px;
    margin: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: Arial, sans-serif;
    background: rgba(255, 255, 255, 0.02);
}

.tag_edit_form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.tag_edit_form select,
.tag_edit_form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.tag_edit_form textarea {
    resize: vertical;
}

.tag_edit_form button {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
}

.tag_edit_form button:hover {
    background-color: #0056b3;
}

.form-field {
    margin-bottom: 20px;
}

  /* Gallery Styling */
  .tag-gallery { margin-top: 20px; }

  .gallery-grid {
    display: grid;
    /* Desktop: 6 columns */
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
  }

  .gallery-grid img {
    width: 80%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    display: flex;
  }

/* Vertically align when screen width is less than 768px */
@media (max-width: 767px) {
    .tag-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .meta-separator {
        display: none; /* Hide the pipe dividers on mobile */
    }

    .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .tag-view-container {
        flex-direction: column-reverse; /* Places .right on top and .left on bottom */
    }

    .left, .right {
        width: 100%; /* Forces them to take full width when stacked */
    }

}