/* ========================================
   JSON Interactive Tooltips - Plug & Play
   ======================================== */

/* Timestamp Styles */
.json-timestamp {
    cursor: help;
    border-bottom: 1px dotted rgba(206, 145, 120, 0.4);
    position: relative;
}

/* Image URL Styles */
.json-image-url {
    cursor: pointer;
    border-bottom: 1px dotted rgba(206, 145, 120, 0.4);
    position: relative;
}

/* Color Value Styles */
.json-color-value {
    cursor: pointer;
    border-bottom: 1px dotted rgba(206, 145, 120, 0.4);
    position: relative;
}

/* Email Styles */
.json-email {
    cursor: pointer;
    border-bottom: 1px dotted rgba(206, 145, 120, 0.4);
    position: relative;
    color: #9cdcfe;
}

.json-color-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Tooltip Styles */
.json-interactive-tooltip {
    position: fixed;
    background: #2d2d30;
    border: 1px solid #454545;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    max-width: 400px;
    pointer-events: none;
}

.json-interactive-tooltip.show {
    opacity: 1;
}

.json-interactive-tooltip.pinned {
    pointer-events: auto;
}

.json-tooltip-header {
    font-weight: 600;
    color: #9cdcfe;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.json-tooltip-content {
    color: #d4d4d4;
    font-size: 13px;
}

.json-tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #3e3e42;
}

.json-tooltip-row:last-child {
    border-bottom: none;
}

.json-tooltip-label {
    color: #9cdcfe;
    margin-right: 12px;
    min-width: 80px;
}

.json-tooltip-value {
    color: #ce9178;
    text-align: right;
    flex: 1;
}

/* Image Preview Tooltip */
.json-image-tooltip {
    max-width: 320px;
}

.json-image-tooltip img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
    margin-top: 8px;
    background: #1e1e1e;
}

.json-image-loading {
    text-align: center;
    padding: 20px;
    color: #9cdcfe;
}

/* Calendar View */
.json-calendar-view {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.json-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #9cdcfe;
    font-weight: 600;
}

.json-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.json-calendar-day-header {
    text-align: center;
    color: #9cdcfe;
    font-size: 11px;
    padding: 4px;
    font-weight: 600;
}

.json-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    color: #d4d4d4;
    background: #2d2d30;
}

.json-calendar-day.other-month {
    opacity: 0.3;
}

.json-calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Color Picker Modal */
.json-color-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.json-color-picker-modal.show {
    display: flex;
}

.json-color-picker-content {
    background: #2d2d30;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 400px;
}

.json-color-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.json-color-picker-title {
    color: #9cdcfe;
    font-size: 18px;
    font-weight: 600;
}

.json-color-close-btn {
    background: none;
    border: none;
    color: #d4d4d4;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.json-color-close-btn:hover {
    background: #3e3e42;
}

.json-color-display {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #454545;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.json-color-input-group {
    margin-bottom: 16px;
}

.json-color-input-label {
    color: #9cdcfe;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.json-color-input {
    width: 100%;
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid #454545;
    border-radius: 6px;
    color: #d4d4d4;
    font-family: 'Consolas', monospace;
    font-size: 14px;
}

.json-color-input:focus {
    outline: none;
    border-color: #667eea;
}

.json-color-properties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.json-color-property {
    background: #1e1e1e;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #454545;
}

.json-color-property-label {
    color: #9cdcfe;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.json-color-property-value {
    color: #ce9178;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

.json-color-picker-native {
    width: 100%;
    height: 50px;
    border: 1px solid #454545;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 16px;
}

.json-color-button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.json-color-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.json-color-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.json-color-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.json-color-btn-secondary {
    background: #3e3e42;
    color: #d4d4d4;
}

.json-color-btn-secondary:hover {
    background: #4e4e52;
}