/* Minecraft Connect Plugin Styles */

.minecraft-connect-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.mc-header-left h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.mc-icon {
    color: #10b981;
}

.mc-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Status Indicator */
.mc-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 500;
}

.mc-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
    transition: all 0.3s ease;
}

.mc-status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.mc-status-dot.waiting {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tabs */
.mc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.mc-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.mc-tab:hover {
    color: #1f2937;
    background: #f9fafb;
}

.mc-tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

/* Tab Content */
.mc-tab-panel {
    display: none;
}

.mc-tab-panel.active {
    display: block;
}

/* Section Header */
.mc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mc-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

/* Buttons */
.mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mc-btn-primary {
    background: #10b981;
    color: white;
}

.mc-btn-primary:hover:not(:disabled) {
    background: #059669;
}

.mc-btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
}

.mc-btn-secondary:hover:not(:disabled) {
    background: #d1d5db;
}

.mc-btn-danger {
    background: #ef4444;
    color: white;
}

.mc-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.mc-btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Empty State */
.mc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.mc-empty-state p {
    margin: 8px 0;
}

.mc-text-muted {
    color: #9ca3af;
    font-size: 14px;
}

/* Mappings List */
.mc-mappings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-mapping-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.mc-mapping-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mc-mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mc-mapping-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #1f2937;
}

.mc-mapping-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.mc-mapping-badge.gift { background: #fef3c7; color: #92400e; }
.mc-mapping-badge.follow { background: #dbeafe; color: #1e40af; }
.mc-mapping-badge.like { background: #fce7f3; color: #9f1239; }
.mc-mapping-badge.share { background: #e0e7ff; color: #3730a3; }
.mc-mapping-badge.chat { background: #d1fae5; color: #065f46; }
.mc-mapping-badge.subscribe { background: #f3e8ff; color: #6b21a8; }

.mc-mapping-actions {
    display: flex;
    gap: 8px;
}

.mc-mapping-body {
    color: #6b7280;
    font-size: 14px;
}

.mc-mapping-arrow {
    margin: 0 8px;
    color: #10b981;
}

.mc-mapping-conditions {
    margin-top: 8px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
}

/* Actions Grid */
.mc-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.mc-action-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.mc-action-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.mc-action-params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mc-param-badge {
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 12px;
    color: #6b7280;
    font-family: monospace;
}

/* Events List */
.mc-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.mc-event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mc-event-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-event-type {
    font-weight: 600;
    color: #1f2937;
}

.mc-event-details {
    font-size: 13px;
    color: #6b7280;
}

.mc-event-time {
    font-size: 12px;
    color: #9ca3af;
}

/* Settings */
.mc-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.mc-settings-section {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.mc-settings-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.mc-form-group {
    margin-bottom: 16px;
}

.mc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.mc-form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.mc-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.mc-input:focus {
    outline: none;
    border-color: #10b981;
}

.mc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mc-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Stats */
.mc-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mc-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.mc-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
}

.mc-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

/* Modal */
.mc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.mc-modal.active {
    display: flex;
}

.mc-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.mc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.mc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.mc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.mc-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.mc-modal-body {
    padding: 20px;
}

.mc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 2px solid #e5e7eb;
}

/* Condition Editor */
.mc-condition {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
}

.mc-condition-field {
    flex: 1;
}

.mc-condition-operator {
    width: 120px;
}

.mc-condition-value {
    flex: 1;
}

.mc-condition-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

.mc-condition-remove:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .mc-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .mc-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .mc-mapping-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .mc-tabs {
        overflow-x: auto;
    }
}
