/* RDFa Editor annotation overlay styles.
   Host UIs that provide their own form styling (e.g. Bootstrap)
   should omit this file and style #rdfa-editor-overlay themselves. */

/* Modern Overlay Styling */
            #rdfa-editor-overlay {
                background: linear-gradient(to bottom, #f8f9fa, #ffffff);
                border: 2px solid #2196f3;
                border-radius: 8px;
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
                font-family: "Roboto", sans-serif;
                min-width: 450px;
                max-width: 500px;
                z-index: 10000;
            }

.rdfa-editor-ui .overlay-header {
                background: linear-gradient(135deg, #2196f3, #1976d2);
                color: white;
                padding: 16px 20px;
                border-radius: 6px 6px 0 0;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }

.rdfa-editor-ui .overlay-header h3 {
                margin: 0 0 8px 0;
                font-size: 18px;
                font-weight: 500;
            }

#rdfa-editor-overlay form {
                padding: 20px;
            }

/* Statement (S / P / O) framing */
            .rdfa-editor-ui .statement {
                display: grid;
                grid-template-columns: 26px 1fr;
                gap: 10px 12px;
                align-items: center;
                background: #e3f2fd;
                border-radius: 6px;
                padding: 14px 16px;
                margin-bottom: 16px;
            }

.rdfa-editor-ui .stmt-role {
                font-family: 'Courier New', monospace;
                font-weight: bold;
                font-size: 12px;
                color: white;
                background: #2196f3;
                border-radius: 50%;
                width: 24px;
                height: 24px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

#stmt-subject {
                font-family: 'Courier New', monospace;
                font-size: 12px;
                color: #1565c0;
                word-break: break-all;
            }

/* Advanced fields disclosure */
            #rdfa-editor-overlay details {
                border: 1px solid #e0e0e0;
                border-radius: 6px;
                padding: 8px 16px;
                margin-bottom: 16px;
                background: white;
            }

#rdfa-editor-overlay summary {
                cursor: pointer;
                font-size: 13px;
                font-weight: 500;
                color: #757575;
                padding: 4px 0;
            }

#rdfa-editor-overlay details fieldset {
                margin-top: 12px;
            }

/* Fieldsets */
            #rdfa-editor-overlay fieldset {
                border: 1px solid #e0e0e0;
                border-radius: 6px;
                padding: 12px 16px;
                margin-bottom: 16px;
                background: white;
            }

#rdfa-editor-overlay label {
                display: block;
                font-weight: 500;
                color: #424242;
                margin-bottom: 8px;
                font-size: 14px;
            }

#rdfa-editor-overlay input[type="text"],
            #rdfa-editor-overlay select {
                width: 100%;
                padding: 10px 12px;
                border: 1px solid #ccc;
                border-radius: 4px;
                font-size: 14px;
                font-family: "Roboto", sans-serif;
                transition: border-color 0.2s;
                box-sizing: border-box;
            }

#rdfa-editor-overlay input[type="text"]:focus,
            #rdfa-editor-overlay select:focus {
                outline: none;
                border-color: #2196f3;
                box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
            }

#rdfa-editor-overlay input[type="text"]:disabled {
                background-color: #f5f5f5;
                color: #999;
            }

.rdfa-editor-ui .helper-text {
                display: block;
                font-size: 12px;
                color: #757575;
                margin-top: 6px;
                font-style: italic;
            }

/* Action Buttons */
            .rdfa-editor-ui .action-buttons {
                display: flex;
                gap: 12px;
                margin-top: 20px;
                justify-content: flex-end;
            }

.rdfa-editor-ui .btn-primary,
            .rdfa-editor-ui .btn-secondary,
            .rdfa-editor-ui .btn-danger {
                padding: 10px 24px;
                border: none;
                border-radius: 4px;
                font-size: 14px;
                font-weight: 500;
                cursor: pointer;
                transition: all 0.2s;
                font-family: "Roboto", sans-serif;
            }

.rdfa-editor-ui .btn-primary {
                background: #4caf50;
                color: white;
            }

.rdfa-editor-ui .btn-primary:hover {
                background: #45a049;
                box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
            }

.rdfa-editor-ui .btn-secondary {
                background: #f5f5f5;
                color: #424242;
                border: 1px solid #e0e0e0;
            }

.rdfa-editor-ui .btn-secondary:hover {
                background: #e0e0e0;
            }

.rdfa-editor-ui .btn-danger {
                background: #f44336;
                color: white;
                margin-right: auto;
            }

.rdfa-editor-ui .btn-danger:hover {
                background: #d32f2f;
                box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
            }

#rdfa-editor-overlay input[name="custom-datatype"] {
                margin-top: 8px;
            }

/* Typeahead lookups (property / type) */
            .rdfa-editor-ui .typeahead-field {
                position: relative;
                display: block;
            }

.rdfa-editor-ui .typeahead-menu {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                z-index: 10002;
                margin: 2px 0 0 0;
                padding: 4px;
                list-style: none;
                background: white;
                border: 1px solid #e0e0e0;
                border-radius: 6px;
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
                max-height: 260px;
                overflow-y: auto;
            }

.rdfa-editor-ui .typeahead-option {
                display: flex;
                align-items: baseline;
                justify-content: space-between;
                gap: 10px;
                padding: 7px 10px;
                border-radius: 4px;
                font-size: 14px;
                color: #212121;
                cursor: pointer;
            }

/* children never intercept the mousedown, so the <li> is always the event target */
            .rdfa-editor-ui .typeahead-option * {
                pointer-events: none;
            }

.rdfa-editor-ui .typeahead-option:hover,
            .rdfa-editor-ui .typeahead-option[aria-selected="true"] {
                background: #e3f2fd;
                color: #0d47a1;
            }

.rdfa-editor-ui .typeahead-option-label strong {
                font-weight: 700;
            }

.rdfa-editor-ui .typeahead-option-uri {
                flex: 0 1 auto;
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 11px;
                color: #9e9e9e;
            }

.rdfa-editor-ui .typeahead-value {
                display: flex;
                align-items: center;
                gap: 8px;
                width: 100%;
                padding: 10px 12px;
                border: 1px solid #ccc;
                border-radius: 4px;
                background: white;
                font-size: 14px;
                font-family: "Roboto", sans-serif;
                text-align: left;
                cursor: pointer;
            }

.rdfa-editor-ui .typeahead-value:hover {
                border-color: #2196f3;
            }

.rdfa-editor-ui .typeahead-label {
                flex: 1 1 auto;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

.rdfa-editor-ui .typeahead-clear {
                flex: 0 0 auto;
                color: #9e9e9e;
                font-size: 16px;
                line-height: 1;
                padding: 0 2px;
            }

.rdfa-editor-ui .typeahead-clear:hover {
                color: #f44336;
            }
