/**
 * Teams CSS - Styling for team management pages
 */

/* Team Cards */
.team-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.team-card .avatar {
    font-weight: 600;
    font-size: 1.25rem;
}

.team-card .card-title a {
    text-decoration: none;
}

.team-card .card-title a:hover {
    color: var(--tblr-primary) !important;
}

/* Stats Cards Animation */
.row-deck .card {
    transition: transform 0.15s ease;
}

.row-deck .card:hover {
    transform: translateY(-1px);
}

/* Member Avatars */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

/* Invite Code Input */
.font-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.1em;
}

/* Activity List */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Tab Badges */
.nav-tabs .nav-link .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    vertical-align: middle;
}

/* Resource Cards */
.tab-pane .card {
    transition: border-color 0.2s ease;
}

.tab-pane .card:hover {
    border-color: var(--tblr-primary);
}

/* Danger Zone Card */
.border-danger {
    border-color: var(--tblr-danger) !important;
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Success Modal */
.modal-status {
    height: 4px;
    border-radius: var(--tblr-border-radius) var(--tblr-border-radius) 0 0;
}

/* Empty State */
#empty-state {
    background: linear-gradient(180deg, var(--tblr-bg-surface) 0%, var(--tblr-bg-surface-secondary) 100%);
}

#empty-state .icon-lg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

/* Datagrid styling */
.datagrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.datagrid-item {
    display: flex;
    flex-direction: column;
}

.datagrid-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-muted);
    margin-bottom: 0.25rem;
}

.datagrid-content {
    font-size: 0.875rem;
}

/* Table Improvements */
.table-vcenter td,
.table-vcenter th {
    vertical-align: middle;
}

.table .btn-list {
    gap: 0.25rem;
}

/* Progress Bar */
.progress-sm {
    height: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-header .btn-list {
        flex-wrap: wrap;
    }

    .page-header .btn-list .btn {
        flex: 1 1 auto;
    }

    .datagrid {
        grid-template-columns: 1fr;
    }

    .card-header-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

/* Locations List */
#locations-list .list-group-item {
    padding: 0.75rem 1rem;
}

#locations-list .btn-list {
    opacity: 0;
    transition: opacity 0.15s ease;
}

#locations-list .list-group-item:hover .btn-list {
    opacity: 1;
}

/* Invitation Cards */
.border-warning {
    border-color: var(--tblr-warning) !important;
    border-width: 2px;
}

/* Ghost Buttons */
.btn-ghost-secondary:hover,
.btn-ghost-danger:hover,
.btn-ghost-primary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Form Improvements */
.form-control-lg {
    font-size: 1.25rem;
}

/* Tooltips for icon buttons */
.btn-icon {
    padding: 0.5rem;
}

.btn-icon .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Color picker input */
input[type="color"].form-control-color {
    width: 3rem;
    height: 2.375rem;
    padding: 0.25rem;
}

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

.row-cards .col-md-6,
.row-cards .col-lg-4 {
    animation: fadeIn 0.3s ease forwards;
}

.row-cards .col-md-6:nth-child(2),
.row-cards .col-lg-4:nth-child(2) {
    animation-delay: 0.05s;
}

.row-cards .col-md-6:nth-child(3),
.row-cards .col-lg-4:nth-child(3) {
    animation-delay: 0.1s;
}

.row-cards .col-md-6:nth-child(4),
.row-cards .col-lg-4:nth-child(4) {
    animation-delay: 0.15s;
}

/* Organization hierarchy tree (for Phase 3) */
.org-tree {
    padding-left: 0;
    list-style: none;
}

.org-tree ul {
    padding-left: 1.5rem;
    border-left: 1px solid var(--tblr-border-color);
    margin-left: 0.75rem;
}

.org-tree li {
    position: relative;
    padding: 0.5rem 0;
}

.org-tree li::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 1rem;
    height: 1px;
    background: var(--tblr-border-color);
}

.org-tree .org-node {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

.org-tree .org-node:hover {
    border-color: var(--tblr-primary);
}
