.mw-960 { max-width: 960px; }
.mw-480 { max-width: 480px; }
.mx-auto { margin-left: auto; margin-right: auto ; }

/* Base style for both messages */
.info-message,
.error-message,
.copy-message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #f9f9f9;  /* Light gray background */
    border-left: 6px solid;     /* Colored stripe on the left */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  /* Subtle shadow */
    font-family: Arial, sans-serif;
    font-size: 14px;
}
/* ✅ Info Message Styling */
.info-message {
    border-color: #4caf50;         /* Green stripe */
    color: #2e7d32;                /* Darker green text */
    background-color: #e8f5e9;     /* Light greenish background */
}
/* ❌ Error Message Styling */
.error-message {
    border-color: #f44336;         /* Red stripe */
    color: #c62828;                /* Dark red text */
    background-color: #ffebee;     /* Light reddish background */
}
/* Copy Message Styling */
.copy-message {
    border-color: #007bff;
    color: #004085;
    background-color:  #e0f2ff;
}

.spaced-links {
    gap: 15px;
}

a.material-icons, a.material-icons-outlined {
    text-decoration: none;
    color: inherit;
}

.material-icons, .material-icons-outlined {
    font-size: 36px !important;  /* Default size */
    color: #333;  /* Dark grey */
    vertical-align: middle;
}

/* Make material icons white if inside an <a> with role="button" */
a[role="button"] .material-icons,
a[role="button"] .material-icons-outlined {
    color: #fff !important;
}

a.no-decoration {
    text-decoration: none;
}

/* 📌 Navigation Bar Container */
.nav-bar {
    background-color: #ffffff;       /* Clean white background */
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    border-bottom: 2px solid #e0e0e0;
    align-items: center;              /* ✅ Fix: Center items properly */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    justify-content: space-between;  /* ✅ Ensures space between logo & links */
    position: relative;
}

/* 🚀 Navigation Links */
.nav-bar .nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

/* ✅ Hide menu on small screens */
@media (max-width: 768px) {
    .nav-bar {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;
    }

    .nav-bar.show {
        display: flex; /* ✅ Show when toggled */
    }
    .nav-bar a {
        padding: 10px 15px;  /* ✅ Ensure clickable padding */
        width: 100%;          /* ✅ Full width for better tap targets */
        text-align: left;     /* ✅ Left-align text */
    }
}

/* 🌟 Links */
.nav-bar a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-bar a:hover {
    background-color: #007bff;
    color: #ffffff;
}

/* 🎯 Active Link */
.nav-bar a.active {
    background-color: #0056b3;
    color: #ffffff;
}

/* 🍔 Hamburger Button */
.hamburger-menu {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: none;  /* ✅ Hidden on large screens */
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;  /* ✅ Show hamburger on small screens */
    }
}


.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-family: Arial, sans-serif;
}

.pagination a {
    padding: 8px 12px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

.pagination a.disabled {
    color: #aaa;
    border-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;  /* Prevent click events */
    background-color: #f9f9f9;
}

.pagination .current-page {
    font-weight: bold;
    padding: 8px 12px;
}

.pagination .page-size-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    margin-top: 15px;
}

.page-size-container select {
    max-width: 6em;
}

.pagination-spacer {
    flex: 1; /* ✅ Pushes pagination to the center */
}

.info-message ul,
.error-message ul {
    all: unset;  /* ✅ Completely resets styles */
    display: block;
    padding-left: 0;
    margin: 0;
}

ul.list-responses, ul.list-responses li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

ul.list-responses li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Mark table non-essential columns to disappear for modile view */
@media (max-width: 768px) {  /* ✅ Adjusts for tablets & phones */
    .hide-mobile { 
        display: none;  /* ✅ Hides less important columns */
    }
}

.copy-message input {
    flex-grow: 1;             /* Input takes available space */
    background: none;
    border: none;
    padding: 4px;
    margin-bottom: 0px;
}

/* 🔴 Red Danger Button */
button.danger,
a.danger {
    background-color: #dc3545 !important; /* Red */
    color: white !important;
    border: 1px solid #dc3545 !important; /* Keeps button size consistent */
    outline: none !important;
}
button.danger:hover,
a.danger:hover {
    background-color: #c82333 !important; /* Darker Red */
    border-color: #c82333 !important;
}
button.danger:focus,
a.danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5) !important; /* Subtle Red Glow */
    outline: none !important;
}

/* 🟠 Orange Warning Button */
button.warning,
a.warning {
    background-color: #fd7e14 !important; /* Orange */
    color: white !important;
    border: 1px solid #fd7e14 !important;
    outline: none !important;
}
button.warning:hover,
a.warning:hover {
    background-color: #e66900 !important; /* Darker Orange */
    border-color: #e66900 !important;
}
button.warning:focus,
a.warning:focus {
    box-shadow: 0 0 0 0.2rem rgba(253, 126, 20, 0.5) !important; /* Subtle Orange Glow */
    outline: none !important;
}

/* 🟢 Green Success Button */
button.success,
a.success {
    background-color: #28a745 !important; /* Green */
    color: white !important;
    border: 1px solid #28a745 !important;
    outline: none !important;
}
button.success:hover,
a.success:hover {
    background-color: #218838 !important; /* Darker Green */
    border-color: #218838 !important;
}
button.success:focus,
a.success:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5) !important; /* Subtle Green Glow */
    outline: none !important;
}

.disabled-row {
    opacity: 0.5; /* Makes row look faded */
    /* pointer-events: none; /* Prevents interaction */
    background-color: #f0f0f0; /* Light gray */
}

.upload-box {
    border: 2px dashed #007bff; /* Blue border for drag area */
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.upload-box p {
    color: #333;
    font-size: 14px;
}

.upload-label {
    font-weight: bold;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}

/* 🎯 When dragging a file over */
.upload-box.dragover {
    background-color: #e0f3ff;
    border-color: #0056b3;
}

.file-list {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.file-list ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.file-list li {
    list-style: none;
    padding: 5px;
    font-size: 14px;
}

.remove-file {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
    font-size: 14px;
}

.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.file-preview-image {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 300px;
    max-height: 300px;
    margin: 10px;
}

.file-preview-video {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 300px;
    height: 300px;
    max-height: 300px;
    margin: 10px;
}

.file-preview-video .video-js {
    width: 100%;
    height: 100%;
}

.file-preview-slot {
    margin: 20px 0;
}

.file-preview-inline {
    margin: 20px 0;
    text-align: center;
}

.file-preview-image-inline {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.file-preview-video-inline {
    display: block;
    width: 100%;
    max-width: 100%;
}

.file-preview-video-inline .video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.file-details-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    margin: 20px 0;
}

.file-details-header .file-preview-inline {
    flex: 1 1 320px;
    max-width: min(100%, 640px);
    margin: 0;
}

.file-details-meta {
    flex: 1 1 320px;
    min-width: 260px;
}

.context-menu {
    position: fixed;
    z-index: 2000;
    min-width: 200px;
    max-width: 240px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    display: none;
    padding: 0.35rem 0;
}

.context-menu-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 1rem;
    color: #1f2933;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.context-menu-item:hover,
.context-menu-item:focus {
    background: #f1f5f9;
    outline: none;
}

.context-menu-icon {
    font-size: 1.1rem !important;
    color: #475569;
}

.context-menu-label {
    flex: 1 1 auto;
}

.context-menu-trigger {
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.25rem;
    transition: background 0.15s ease;
    color: #1f2933;
}

.context-menu-trigger:hover,
.context-menu-trigger:focus-visible {
    background: rgba(148, 163, 184, 0.25);
    outline: none;
}

.context-menu-trigger .material-icons-outlined {
    font-size: 1.2rem;
}

.context-actions-cell {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.context-menu-template {
    display: none;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item {
    display: block;
}

.profile-email-input {
    background-color: #f3f3f3;
    color: #555;
}

.current-password-label {
    color: #1976d2;
    font-weight: 600;
    margin-top: 0.75rem;
}

.folder-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.folder-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: #555;
}

.folder-breadcrumb-link {
    color: #1976d2;
    text-decoration: none;
}

.folder-breadcrumb-link.current {
    font-weight: 600;
    cursor: default;
    color: #333;
}

.folder-breadcrumb-separator {
    color: #999;
}

.folder-subfolders {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.folder-subfolders-label {
    font-weight: 600;
    color: #444;
}

.folder-subfolder-link {
    color: #1976d2;
    text-decoration: none;
}

.folder-subfolder-link:hover {
    text-decoration: underline;
}

.folder-subfolders-separator {
    color: #aaa;
}

.folder-picker-controls {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.folder-picker-select-wrapper {
    flex: 1 1 260px;
}

.folder-picker-select-wrapper select {
    width: 100%;
}

.folder-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 6px;
    background: #585c62;
    color: #fff;
}

.folder-action-button .material-icons,
.folder-action-button .material-icons-outlined {
    font-size: 1.4rem;
    color: inherit;
}

.recursive-toggle {
    transition: background 0.2s ease, color 0.2s ease;
}

.recursive-toggle.active {
    background: #1976d2;
    color: #fff;
}

.folder-action-button:hover {
    background: #43474d;
}

.recursive-toggle.active:hover {
    background: #1565c0;
}

.folder-stats-row {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: #555;
    font-size: 0.95rem;
}

.folder-stats-row .material-icons-outlined {
    font-size: 1.2rem;
    margin-right: 0.25rem;
    color: inherit;
}

.share-gallery-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    border: none;
    padding: 0;
    margin: 0;
}

.share-gallery-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-gallery-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 600;
}

.share-gallery-controls .share-duration-select {
    min-width: 160px;
}

@media (max-width: 768px) {
    .file-preview-image,
    .file-preview-video {
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 10px 0;
    }

    .file-preview-video {
        display: block;
    }

    .file-preview-video .video-js {
        width: 100%;
        height: auto;
    }

    .file-details-header {
        flex-direction: column;
    }

    .file-details-header .file-preview-inline,
    .file-details-meta {
        width: 100%;
    }
}

/* Highlight editable fields */
.editable-field {
    cursor: pointer;
    border-bottom: 1px dashed #1976d2;
    transition: background 0.2s;
    position: relative;
    padding-right: 0; /* keep underline tight to the text */
    margin-right: 1.6em; /* reserve space for hover icon without extending underline */
}

/* Optional: subtle background on hover */
.editable-field:hover {
    background: #e3f2fd;
}

/* Show edit icon on hover */
.editable-field::after {
    content: '';
    font-family: 'Material Icons';
    font-size: 1em;
    color: #1976d2;
    position: absolute;
    right: -1.1em;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.editable-field:hover::after {
    content: 'edit';
    opacity: 1;
}

.editable-field::before {
    content: attr(data-hint);
    position: absolute;
    left: 50%;
    transform: translate(-50%, -8px);
    bottom: 100%;
    background: rgba(25, 118, 210, 0.92);
    color: #fff;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.7rem;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.editable-field:hover::before {
    opacity: 1;
    transform: translate(-50%, -12px);
}

.actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.actions-inline.actions-compact {
    gap: 0.5rem;
}

.actions-inline.actions-right {
    justify-content: flex-end;
}

.actions-inline > * {
    flex: 0 0 auto;
}

.actions-inline button,
.actions-inline a[role="button"] {
    width: auto;
}

.actions-inline .btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.actions-right {
    margin-left: auto;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    font-size: 0.75rem;
    line-height: 1;
}

.btn-icon .material-icons,
.btn-icon .material-icons-outlined {
    font-size: 0.9rem;
}

.sync-status {
    max-width: 320px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.edit-input {
    display: inline-block;
    font-size: inherit;
    font-family: inherit;
    width: auto !important;
    min-width: 6em;
    background: #e3f2fd;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 40px; /* collapsed width */
    height: 100vh;
    background: #f5f5f5;
    box-shadow: -2px 0 8px rgba(0,0,0,0.08);
    transition: width 0.3s;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.drawer.expanded {
    width: 450px; /* expanded width */
}

.drawer-handle {
    position: absolute;
    left: 0px;
    top: 20%;
    transform: translateY(-50%);
    background: #1976d2;
    color: white;
    border-radius: 4px 0 0 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.5em;
    box-shadow: -2px 0 6px rgba(0,0,0,0.08);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.drawer-handle:hover {
    background: #1565c0;
}

.drawer-content {
    padding: 1em;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    overflow: auto; /* Allow scrolling if content overflows */
    height: 100%;
}

.drawer.expanded .drawer-content {
    opacity: 1;
    pointer-events: auto;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
}

@media (min-width: 400px) {
    .home-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
    }
}
.home-grid article {
    background: #fff;
    border-radius: 8px;
    padding: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.choices-select,
.choices__inner {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
}
.flex-row .choices {
    flex: 1 1 0%;
    min-width: 0;
}

.scroll-cell {
    max-width: 20vw;
    width: 20vw;
    overflow-x: auto;
    white-space: nowrap;
}

.qr-preview-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.qr-preview-image {
    max-width: min(100%, 320px);
    height: auto;
}

.qr-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.qr-title-row .material-icons-outlined {
    font-size: 2rem;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.qr-inline-preview {
    margin-top: 1rem;
}
