/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 */

:host {
  display: block;
}

.status-org-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;

  &:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  }
}

/* ---------- Empty state ---------- */
.status-org-empty {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #f0f5ff 0%, #fafafa 100%);
  border-left: 4px solid #1890ff;
}

.status-org-empty-icon {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #1890ff;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.status-org-empty-content {
  flex: 1;
  min-width: 0;
}

.status-org-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 4px;
}

.status-org-empty-desc {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.6;
}

.status-org-empty-action {
  flex: 0 0 auto;
}

/* ---------- Configured summary ---------- */
.status-org-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-left: 4px solid #1890ff;
  transition: border-color 0.2s ease;
}

.status-org-summary-logo {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

  img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
}

.status-org-summary-body {
  flex: 1;
  min-width: 0;
}

.status-org-summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;

  .status-org-name {
    font-size: 18px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.88);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-org-tag {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
}

.status-org-summary-desc {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.status-org-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);

  .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 260px;

    a {
      color: rgba(0, 0, 0, 0.55);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;

      &:hover {
        color: #1890ff;
      }
    }
  }

  .color-chip {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
  }
}

.status-org-summary-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
  color: #fff !important;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.25);

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
    color: #fff !important;
  }

  i {
    font-size: 12px;
  }
}

/* ---------- Inline edit form ---------- */
.status-org-edit-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;

  .status-org-edit-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
  }
}

.status-org-card .-inner-content {
  padding: 24px 24px 8px;
}

.status-org-edit-actions {
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

/* ---------- Tabset polish ---------- */
.status-tabset {
  background: #fff;
  border-radius: 8px;
  padding: 8px 16px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .status-org-empty,
  .status-org-summary {
    flex-wrap: wrap;
    padding: 20px 16px;
  }

  .status-org-summary-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px dashed #f0f0f0;
  }

  .status-org-summary-meta {
    gap: 10px;

    .meta-item {
      max-width: 100%;
    }
  }
}
