/* Custom styles for Event Extractor */

/* Tab styles */
.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Content selection styles */
.content-selectable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-selectable:hover {
    background-color: #f3f4f6;
    outline: 2px solid #e5e7eb;
    outline-offset: 2px;
}

.content-selected {
    background-color: #dbeafe !important;
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px;
    position: relative;
}

.content-selected::before {
    content: attr(data-field-label);
    position: absolute;
    top: -25px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

/* Field selector active state */
.field-selector.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Content frame styles */
#contentFrame iframe {
    width: 100%;
    height: 600px;
    border: none;
}

#contentFrame img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Extracted data styles */
.extracted-field {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

.extracted-field-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    font-size: 14px;
}

.extracted-field-value {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Event card styles */
.event-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.event-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.event-card-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-card-title {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
}

.event-card-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.event-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.event-card-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.event-card-field-icon {
    color: #6b7280;
    width: 16px;
    margin-top: 2px;
}

.event-card-field-content {
    flex: 1;
    min-width: 0;
}

.event-card-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card-field-value {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-badge.extracted {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.verified {
    background: #d1fae5;
    color: #065f46;
}

/* Source type badges */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-badge.url {
    background: #fef3c7;
    color: #92400e;
}

.source-badge.image {
    background: #e0e7ff;
    color: #3730a3;
}

.source-badge.manual {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .event-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .event-card-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    
    .event-card-meta {
        grid-template-columns: 1fr;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection highlight colors for different field types */
.field-title { background-color: #fef3c7 !important; outline-color: #f59e0b !important; }
.field-date_time { background-color: #ddd6fe !important; outline-color: #8b5cf6 !important; }
.field-location { background-color: #fecaca !important; outline-color: #ef4444 !important; }
.field-description { background-color: #d1fae5 !important; outline-color: #10b981 !important; }
.field-url { background-color: #dbeafe !important; outline-color: #3b82f6 !important; }
.field-type { background-color: #fed7d7 !important; outline-color: #e53e3e !important; }

/* Field label colors */
.field-title::before { background-color: #f59e0b !important; }
.field-date_time::before { background-color: #8b5cf6 !important; }
.field-location::before { background-color: #ef4444 !important; }
.field-description::before { background-color: #10b981 !important; }
.field-url::before { background-color: #3b82f6 !important; }
.field-type::before { background-color: #e53e3e !important; }

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}