.vp-admin-container {
    padding: 10px;
}

.vp-section {
    margin-bottom: 40px;
}

.vp-section h3 {
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #444;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
}

.vp-section-divider {
    border: none;
    border-top: 3px solid #eee;
    margin: 40px 0;
}

.vp-row {
    background: #fdfdfd;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vp-row:hover {
    border-color: #ccc;
}

.vp-row-actions {
    text-align: right;
    margin-top: 10px;
}

.vp-delete {
    background: transparent;
    color: #888;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.vp-delete:hover {
    color: #333;
    transform: scale(1.1);
}

.vp-add {
    background-color: #efefef;
    color: #444;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.vp-add:hover {
    background-color: #e5e5e5;
    border-color: #bbb;
}

/* Omeka S Form Styling Overrides */
.vp-row .field {
    margin-bottom: 12px;
}

.vp-row .field:last-child {
    margin-bottom: 0;
}

.vp-row .field-meta label {
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    display: block;
}

.vp-row .inputs input[type="text"],
.vp-row .inputs input[type="number"],
.vp-row .inputs textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.vp-row .inputs textarea {
    min-height: 80px;
}

/* Language Selection Styling */
.vp-input-with-lang {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
}

.vp-input-with-lang input[type="text"],
.vp-input-with-lang textarea {
    flex: 1;
    min-width: 200px;
}

.vp-lang-toggle {
    background: none;
    border: none;
    color: #cc0000;
    /* Matching Omeka S red globe */
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.vp-lang-toggle:hover {
    transform: scale(1.2);
}

.vp-lang-input {
    width: 60px !important;
    font-size: 0.85em !important;
    padding: 4px 6px !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: none;
    /* Hidden by default, toggled by JS */
}

.vp-lang-input.active {
    display: block;
}

/* Frontend interaction styling */
.vp-word-highlight {
    border-bottom: 2px dashed #bbb;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0 2px;
    border-radius: 2px;
    transition: background-color 0.2s, border-color 0.2s;
}

.vp-word-highlight:hover {
    background-color: #ffd700;
    border-bottom-color: #000;
}

/* Specific highlight for Tamil words */
.vp-word-highlight.vp-lang-ta:hover {
    background-color: #ff9d00;
    border-bottom: 2px solid #000;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.vp-lang-badge {
    font-size: 0.6em;
    background: #cc0000;
    color: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Tooltip Card */
.vp-tooltip {
    position: absolute;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 280px;
    border: 1px solid #eee;
    font-family: inherit;
    pointer-events: auto;
    display: none;
    animation: vp-fade-in 0.3s ease-out;
}

@keyframes vp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vp-tooltip h4 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vp-tooltip .meta-info {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.vp-tooltip .pronunciation {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

.vp-tooltip .pronoun {
    background: #f0f0f0;
    color: #555;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.vp-tooltip .meaning {
    font-size: 0.95em;
    line-height: 1.5;
    color: #444;
    margin-bottom: 12px;
}

.vp-tooltip .location,
.vp-tooltip .vp-link,
.vp-tooltip .vp-search {
    font-size: 0.5em;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.vp-tooltip .location {
    color: #f40000;
    background: #f9f9f9;
}

.vp-tooltip .vp-link,
.vp-tooltip .vp-search {
    background: #f0f7ff;
}

.vp-tooltip .vp-link a,
.vp-tooltip .vp-search a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.vp-tooltip .vp-link a:hover,
.vp-tooltip .vp-search a:hover {
    text-decoration: underline;
}

.vp-tooltip-simple {
    font-size: 0.9em;
}

.vp-tooltip-simple strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

/* Sidebar Panel */
.vp-sidebar {
    position: fixed;
    top: 210px;
    right: -450px;
    width: 350px;
    max-width: 90%;
    height: 100vh;
    background: #fff;
    box-shadow: -3px 0 25px rgba(93, 101, 244, 0.15);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

.vp-sidebar.open {
    right: 0;
}

.vp-sidebar-header {
    padding: 20px 25px;
    border-bottom: 1px solid #cfd0d3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(185, 185, 189);
}

.vp-sidebar-title {
    margin: 0;
    font-size: 1.6em;
    color: #121450;
    font-weight: 800;
}

.vp-sidebar-close {
    background: none;
    border: none;
    font-size: 2.2em;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0;
}

.vp-sidebar-close:hover {
    color: #333;
}

.vp-sidebar-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-meta-info {
    margin-bottom: 30px;
}

.sidebar-meta-info h2 {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    color: #222;
}

.sidebar-meta-info .pronunciation,
.sidebar-meta-info .pronoun {
    font-size: 1em;
    color: #666;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 1.1em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section .meaning {
    line-height: 1.6;
    color: #444;
    font-size: 1.05em;
}

/* map */
#vp-sidebar-map {
    height: 200px;
    width: 100%;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* Ensure Leaflet popups follow sidebar style */
.leaflet-popup-content-wrapper {
    border-radius: 4px;
    padding: 2px;
}

.vp-btn:hover {
    background: #babebe;
    text-decoration: none;
}

.vp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.vp-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.vp-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.vp-gallery-item:hover img {
    transform: scale(1.05);
}

.vp-loading,
.vp-mini-loading {
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

.vp-tooltip .location i {
    color: #cc0000;
}

.vp-tooltip-close {
    cursor: pointer;
    color: #ccc;
    font-size: 0.8em;
}

.vp-tooltip-close:hover {
    color: #333;
}
