/* =============================================================
   gallery.css — Bulbmeister Image Gallery
   All styles for the gallery site.
   Loaded via headtags.html for browser caching efficiency.
   ============================================================= */

/* ----- Reset ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----- Base ----- */
body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #2d3748;
    background: url('https://www.bulbmeister.com/images/image_side4.jpg') repeat;
    background-attachment: fixed;
}

.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(247, 250, 252, 0.95) 0%, rgba(237, 242, 247, 0.95) 100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Header ----- */
header {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c29 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    flex: 1;
}

.address-section {
    padding: 0 1rem;
    text-align: right;
    font-size: 0.9rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

/* ----- Desktop Navigation ----- */
nav {
    background: rgba(45, 80, 22, 0.95);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    width: 100%;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ----- Hamburger Button ----- */
.hamburger-menu {
    display: none;
    background: rgba(45, 80, 22, 0.95);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.6rem;
    z-index: 1001;
    position: fixed;
    top: 12px;
    right: 12px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.hamburger-menu:hover {
    background: rgba(45, 80, 22, 1);
    transform: scale(1.05);
}

/* ----- Mobile Sidebar Menu ----- */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c29 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.mobile-nav-links {
    padding: 1rem 0;
}

.mobile-nav-links a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
}

/* ----- Menu Overlay ----- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----- Facebook Like Float ----- */
.facebook-like-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

/* ----- Content Area ----- */
.content-area {
    background: white;
    padding: 20px;
    min-height: 500px;
}

/* ----- Legacy PhotoPost Table Overrides ----- */
table {
    border-collapse: collapse;
}

table[bgcolor="#003300"] {
    background: transparent !important;
}

table[bgcolor="#ffffff"] {
    background: white !important;
    border-radius: 8px;
    overflow: hidden;
}

/* ----- Responsive Images ----- */
img {
    max-width: 100%;
    height: auto;
}

/* ----- Footer ----- */
footer {
    background: #2d5016;
    color: white;
    padding: 3rem 0 1rem;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p {
    margin-bottom: 0.3rem;
}

.footer-section a {
    color: #a0d468;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4a7c29;
    padding-top: 1rem;
    margin-top: 2rem;
}

.footer-home-link {
    color: #a0d468;
    text-decoration: none;
}

.footer-home-link:hover {
    color: white;
}

/* ----- Responsive: Tablet ----- */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex !important;
    }

    .nav-links {
        display: none;
    }

    nav {
        display: none;
    }

    .header-content {
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .address-section {
        text-align: center;
        font-size: 0.85rem;
        padding: 0;
    }

    .facebook-like-float {
        position: relative;
        bottom: auto;
        left: auto;
        margin: 1rem auto;
        display: block;
        width: fit-content;
    }

    .site-wrapper {
        max-width: none;
        box-shadow: none;
    }
}

/* ----- Responsive: Mobile ----- */
@media (max-width: 480px) {
    .logo {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 0.85rem;
    }
}

/* =============================================================
   New gallery component styles
   Added for the rewritten PHP gallery system.
   ============================================================= */

/* ----- Breadcrumb ----- */
.breadcrumb {
    padding: 0.5rem 0 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

.breadcrumb a {
    color: #4a7c29;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ----- Admin bar ----- */
.admin-bar {
    background: #fff3cd;
    border-bottom: 1px solid #ffc107;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.admin-bar a {
    color: #856404;
    font-weight: bold;
    text-decoration: none;
    margin-right: 1rem;
}

.admin-options {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.admin-options a {
    color: #4a7c29;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid #4a7c29;
    border-radius: 3px;
    margin-right: 0.5rem;
}

/* ----- Gallery toolbar (search, sort, quick-date links) ----- */
.gallery-toolbar {
    padding: 0.75rem 0 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}

.toolbar-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-nav-line {
    font-size: 1rem;
    color: #2d3748;
    flex: 1;
}

.toolbar-right {
    text-align: right;
    flex-shrink: 0;
}

.search-form,
.sort-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.search-form input[type="text"],
.sort-form select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-form button,
.sort-form button {
    padding: 0.3rem 0.8rem;
    background: #4a7c29;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-form button:hover,
.sort-form button:hover {
    background: #2d5016;
}

.quick-links {
    font-size: 0.85rem;
    color: #555;
}

.quick-links a {
    color: #4a7c29;
    text-decoration: none;
    margin: 0 0.3rem;
}

.quick-links a:hover {
    text-decoration: underline;
}

/* ----- Category listing table (index.php, list mode) ----- */
.cat-listing {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cat-listing thead th {
    background: #2d5016;
    color: white;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
}

/* Align headers to match their columns */
.cat-listing thead th.col-photos,
.cat-listing thead th.col-popular,
.cat-listing thead th.col-last {
    text-align: center;
}

.cat-listing tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.cat-listing tbody tr:hover {
    background: #f7fafc;
}

.cat-listing td {
    padding: 0.6rem 0.8rem;
    vertical-align: top;
}

/* Family links — large and bold */
.col-category a.family-link {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d5016;
    text-decoration: none;
}

.col-category a.family-link:hover {
    text-decoration: underline;
}

/* Genus links — slightly larger, bold, and italic */
.col-category a.genus-link {
    font-size: 1.0rem;
    font-weight: bold;
    font-style: italic;
    color: #2d5016;
    text-decoration: none;
}

.col-category a.genus-link:hover {
    text-decoration: underline;
}

.col-category { width: 45%; }
.col-photos   { width: 8%; text-align: center; }
.col-popular  { width: 18%; text-align: center; vertical-align: middle; }
.col-last     { width: 18%; text-align: center; vertical-align: middle; }

.col-popular img,
.col-last img {
    max-height: 70px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 3px;
}

.last-date {
    font-size: 0.82rem;
    color: #666;
    display: block;
    margin-top: 0.2rem;
}

.cat-desc {
    font-size: 0.85rem;
    color: #666;
}

.subcats {
    font-size: 0.82rem;
    color: #555;
}

.subcats a {
    color: #4a7c29;
    text-decoration: none;
    margin-right: 0.4rem;
}

.subcats a:hover {
    text-decoration: underline;
}

/* ----- Category thumbnail grid (index.php, grid mode) ----- */
.cat-title {
    font-size: 1.4rem;
    color: #2d5016;
    margin-bottom: 0.75rem;
}

/* ----- Thumbnail grid (showgallery.php) ----- */
.thumb-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.thumb-cell {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s ease;
}

.thumb-cell:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.thumb-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    background: #f7fafc;
    padding: 0.5rem;
}

.thumb-img img {
    max-height: 125px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.thumb-info {
    padding: 0.5rem 0.6rem;
}

.thumb-title {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.thumb-title a {
    color: #2d3748;
    text-decoration: none;
}

.thumb-title a:hover {
    color: #4a7c29;
}

.thumb-meta {
    width: 100%;
    font-size: 0.78rem;
    border-collapse: collapse;
    color: #555;
}

.thumb-meta th {
    text-align: left;
    padding: 0.1rem 0.3rem 0.1rem 0;
    color: #777;
    white-space: nowrap;
    font-weight: normal;
}

.thumb-meta td {
    padding: 0.1rem 0;
}

.thumb-meta a {
    color: #4a7c29;
    text-decoration: none;
}

/* ----- Pagination ----- */
.pagination {
    margin: 0.75rem 0;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    background: #2d5016;
    border-radius: 4px;
    overflow: hidden;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 0.4rem 0.75rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.pagination li:last-child a,
.pagination li:last-child span {
    border-right: none;
}

.pagination li a:hover {
    background: #4a7c29;
}

.pagination li.current span {
    background: #4a7c29;
    font-weight: bold;
}

.pagination li.ellipsis span {
    color: white;
    cursor: default;
}

/* ----- Photo page (showphoto.php) ----- */
.photo-page {
    max-width: 1100px;
    margin: 0 auto;
}

.photo-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.photo-nav img {
    height: 28px;
    width: auto;
}

.photo-display {
    text-align: center;
    margin-bottom: 1.25rem;
}

.photo-title {
    font-size: 1.4rem;
    color: #2d5016;
    margin-bottom: 0.6rem;
}

.photo-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.photo-meta {
    flex: 1;
    min-width: 260px;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.meta-table th {
    text-align: left;
    padding: 0.35rem 0.6rem 0.35rem 0;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
    width: 35%;
    border-bottom: 1px solid #f0f0f0;
}

.meta-table td {
    padding: 0.35rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.meta-table a {
    color: #4a7c29;
    text-decoration: none;
}

.meta-table a:hover {
    text-decoration: underline;
}

.photo-commerce {
    flex: 0 0 220px;
    font-size: 0.88rem;
    border-left: 1px solid #e2e8f0;
    padding-left: 1.25rem;
}

.photo-commerce a {
    color: #4a7c29;
    text-decoration: none;
}

.photo-commerce a:hover {
    text-decoration: underline;
}

.rate-form {
    margin-top: 1rem;
    font-size: 0.88rem;
}

.rate-form select {
    padding: 0.2rem;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    margin-right: 0.4rem;
}

.rate-form button {
    padding: 0.25rem 0.6rem;
    background: #4a7c29;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* ----- Photo / category strips (recent, popular, random) ----- */
.photo-strip {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.strip-title {
    font-size: 1rem;
    color: #2d5016;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.strip-grid {
    display: grid;
    gap: 0.75rem;
}

.strip-item {
    text-align: center;
}

.strip-item img {
    max-height: 160px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 3px;
}

.strip-item p {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    line-height: 1.3;
}

.strip-item a {
    color: #2d3748;
    text-decoration: none;
}

.strip-item a:hover {
    color: #4a7c29;
}

/* ----- Gallery stats line ----- */
.gallery-stats {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

/* ----- No-results message ----- */
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* ----- Responsive: Tablet ----- */
@media (max-width: 768px) {
    .thumb-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .strip-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .photo-details {
        flex-direction: column;
    }

    .photo-commerce {
        flex: none;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 1rem;
    }

    .toolbar-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .col-last {
        display: none;
    }

    .col-popular {
        display: none;
    }
}

/* ----- Responsive: Mobile ----- */
@media (max-width: 480px) {
    .thumb-grid {
        grid-template-columns: 1fr !important;
    }

    .strip-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cat-listing .col-photos {
        display: none;
    }
}

/* ----- Login page ----- */
.login-page {
    max-width: 420px;
    margin: 2rem auto;
}

.login-page h1 {
    color: #2d5016;
    margin-bottom: 1.25rem;
}

.login-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-form .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.login-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.3rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.login-form input:focus {
    outline: none;
    border-color: #4a7c29;
    box-shadow: 0 0 0 2px rgba(74,124,41,0.15);
}

.form-submit button {
    padding: 0.5rem 1.5rem;
    background: #4a7c29;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.form-submit button:hover {
    background: #2d5016;
}

/* ----- Comments page ----- */
.comments-page {
    max-width: 860px;
}

.comments-title {
    font-size: 1.3rem;
    color: #2d5016;
    margin-bottom: 1.25rem;
}

.comments-title a {
    color: #2d5016;
    text-decoration: none;
}

.comment-list {
    margin-bottom: 2rem;
}

.comment-item {
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: #fafafa;
}

.comment-meta {
    font-size: 0.82rem;
    color: #777;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
    margin-right: 0.6rem;
}

.comment-body {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #2d3748;
}

.comment-admin {
    margin-top: 0.4rem;
    font-size: 0.8rem;
}

.comment-admin a {
    color: #c53030;
    text-decoration: none;
}

.comment-admin a:hover {
    text-decoration: underline;
}

.comment-form-wrap {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

.comment-form-wrap h2 {
    font-size: 1.05rem;
    color: #2d5016;
    margin-bottom: 0.75rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.comment-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.comment-form textarea {
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4a7c29;
    box-shadow: 0 0 0 2px rgba(74,124,41,0.15);
}

.comment-form button {
    align-self: flex-start;
    padding: 0.45rem 1.2rem;
    background: #4a7c29;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

.comment-form button:hover {
    background: #2d5016;
}

.comment-login-prompt {
    font-size: 0.9rem;
    color: #555;
    margin-top: 1rem;
}

.comment-login-prompt a {
    color: #4a7c29;
    font-weight: 600;
    text-decoration: none;
}

.back-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.back-link a {
    color: #4a7c29;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ----- Slideshow page ----- */
.slideshow-page {
    text-align: center;
    padding: 0.5rem 0;
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.slideshow-stop {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #c53030;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.slideshow-stop:hover {
    text-decoration: underline;
}

.slideshow-stop img {
    height: 24px;
    width: auto;
}

.slideshow-delay {
    font-size: 0.85rem;
    color: #555;
}

.slideshow-delay a {
    color: #4a7c29;
    text-decoration: none;
    margin: 0 0.2rem;
}

.slideshow-delay a:hover {
    text-decoration: underline;
}

.slideshow-delay strong {
    margin: 0 0.2rem;
    color: #2d5016;
}

.slideshow-image {
    max-width: 1000px;
    margin: 0 auto;
}

.slideshow-title {
    font-size: 1.2rem;
    color: #2d5016;
    margin-bottom: 0.75rem;
}

.slideshow-hint {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.6rem;
    font-style: italic;
}

/* ----- Edit photo page ----- */
.editphoto-page {
    max-width: 760px;
}

.editphoto-page h1 {
    font-size: 1.3rem;
    color: #2d5016;
    margin-bottom: 1.25rem;
}

.edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.edit-table th,
.edit-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.edit-table th {
    text-align: left;
    width: 28%;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
    background: #f7fafc;
}

.edit-table input[type="text"],
.edit-table textarea,
.edit-table select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.edit-table input[type="text"]:focus,
.edit-table textarea:focus,
.edit-table select:focus {
    outline: none;
    border-color: #4a7c29;
    box-shadow: 0 0 0 2px rgba(74,124,41,0.15);
}

.edit-table textarea {
    resize: vertical;
}

.edit-filename {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.delete-warning {
    font-size: 0.85rem;
    color: #c53030;
    margin-left: 0.3rem;
}

.edit-table .form-submit {
    padding-top: 1rem;
    border-bottom: none;
}

.edit-table .form-submit button {
    padding: 0.45rem 1.4rem;
    background: #4a7c29;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
}

.edit-table .form-submit button:hover {
    background: #2d5016;
}

.cancel-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.cancel-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .edit-table th {
        display: block;
        width: 100%;
        border-bottom: none;
        padding-bottom: 0.2rem;
    }
    .edit-table td {
        display: block;
        width: 100%;
        padding-top: 0.2rem;
    }
}

/* ----- Botanical title formatting ----- */
.photo-title em,
.thumb-title em,
.strip-item em {
    font-style: italic;
    font-weight: inherit;
}
