﻿.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.admin-header {
    margin-bottom: 2rem;
    text-align: center;
}

.admin-content {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid var(--medium-gray);
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all var(--transition-speed);
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

    .tab-button:hover {
        color: var(--primary-color);
        background-color: var(--light-gray);
    }

    .tab-button.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

.tab-content {
    padding: 2rem;
}

/* Form Styling */
.form-group label {
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.code-editor {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: var(--light-gray);
    tab-size: 4;
    resize: vertical;
    border-color: #ddd;
    min-height: 300px;
}

    .code-editor:focus {
        background-color: #fff;
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Table Styling */
.suggestions-management,
.apis-management {
    animation: fadeIn 0.3s ease;
}

.table-responsive {
    overflow-x: auto;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 0.25rem;
}

/* Shared Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-lg {
    max-width: 800px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

    .modal-header h5 {
        margin: 0;
        font-size: 1.25rem;
    }

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--medium-gray);
    gap: 0.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .admin-tabs {
        justify-content: center;
    }

    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .tab-content {
        padding: 1.5rem 1rem;
    }

    .modal-dialog {
        margin: 1rem;
    }
}
