/* Admin Panel Styles */

.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.admin-nav a {
    color: #2c8fb3;
    text-decoration: none;
    transition: color 0.2s;
}

.admin-nav a:hover {
    color: #1e6a8c;
    text-decoration: underline;
}

.nav-separator {
    color: #999;
}

/* Admin Event Styles */
.admin-event {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.admin-event:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.event-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-event .event-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.admin-event .event-pubkey {
    font-weight: 600;
    font-family: monospace;
    color: #2c8fb3;
}

.admin-event .event-kind {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-event .event-time {
    margin-left: auto;
    white-space: nowrap;
}

.admin-event .event-content {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border-radius: 3px;
    border-left: 3px solid #2c8fb3;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.event-actions-mini {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Form Styles for Admin */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2c8fb3;
    box-shadow: 0 0 0 2px rgba(44, 143, 179, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: monospace;
}

.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
}

/* Event Actions */
.event-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.event-actions .btn-danger {
    padding: 0.6rem 1.2rem;
}

#selected-count {
    font-size: 0.9rem;
    color: #666;
}

/* Search Input */
#search-input {
    margin-bottom: 1rem;
}

#delete-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tab Navigation */
.admin-tabs-container {
    margin-bottom: 2rem;
}

.tabs-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #f5f5f5;
    color: #2c8fb3;
}

.tab-button.active {
    color: #2c8fb3;
    border-bottom-color: #2c8fb3;
}

.tab-icon {
    font-size: 1.2rem;
}

/* Tab Content */
.tabs-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Server Info Display */
.server-info {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2c8fb3;
}

.server-info p {
    margin: 0.5rem 0;
}

.server-info strong {
    color: #333;
}

/* Config Form Styles */
.config-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.config-section:last-of-type {
    border-bottom: none;
}

.config-section h4 {
    color: #2c8fb3;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.config-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-label:hover {
    background: #f0f0f0;
}

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

.toggle-label span {
    font-weight: 500;
    color: #333;
}

.nips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.nips-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.nips-grid input[type="checkbox"] {
    cursor: pointer;
}

.nips-grid input[type="checkbox"]:disabled {
    opacity: 0.6;
}

.form-help.warning {
    color: #e65100;
    font-weight: 500;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table thead {
    background: #f5f5f5;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.admin-table tbody tr:hover {
    background: #f9f9f9;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-event {
        flex-direction: column;
    }

    .admin-event .event-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-event .event-time {
        margin-left: 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .event-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .event-actions .btn {
        width: 100%;
    }

    /* Mobile tabs */
    .tab-button {
        padding: 0.75rem 1rem;
    }

    .tab-button .tab-label {
        display: none;
    }

    .tab-button .tab-icon {
        font-size: 1.5rem;
    }

    .tabs-nav {
        justify-content: flex-start;
    }

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