/* ==========================================
   Agent Page Stylesheet
   ========================================== */

.content {
    height: auto !important;
    overflow-y: visible !important;
}

.agent-container {
    padding-top: 80px;
    padding-bottom: 30px;
}

.agent-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--phoenix-emphasis-color);
    padding: 1.5rem 1.5rem 0.5rem;
}

/* Welcome Row */
.agent-welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #AE0728; /* Theme primary color */
    margin: 0;
    letter-spacing: -0.5px;
}

.agent-search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.agent-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.875rem;
    border: 1px solid #e3e6ec;
    border-radius: 8px;
    background-color: #fff;
    color: var(--phoenix-body-color);
    transition: all 0.2s ease-in-out;
}

.agent-search-input:focus {
    outline: none;
    border-color: var(--phoenix-primary);
    box-shadow: 0 0 0 3px rgba(174, 7, 40, 0.15);
}

.agent-search-icon {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa2b1;
    pointer-events: none;
    font-size: 0.875rem;
}

/* Gradient Banner */
.agent-banner {
    background: linear-gradient(90deg, #AE0728 0%, #d4304a 50%, #e8667a 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(174, 7, 40, 0.20);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.agent-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 80%);
    transform: rotate(30deg);
    pointer-events: none;
}

.agent-banner-content {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-banner-btn {
    border: 1px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.agent-banner-btn:hover {
    background-color: #ffffff;
    color: #AE0728;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(174, 7, 40, 0.25);
}

.agent-banner-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.agent-banner-close:hover {
    color: #ffffff;
}

/* Category Tabs */
.agent-tabs-container {
    border-bottom: 1px solid #e3e6ec;
    margin-bottom: 1.5rem;
}

.agent-tabs {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.agent-tab-item {
    font-size: 0.95rem;
    font-weight: 600;
    color: #9aa2b1;
    padding-bottom: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.agent-tab-item:hover {
    color: var(--phoenix-primary);
}

.agent-tab-item.active {
    color: var(--phoenix-primary);
}

.agent-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--phoenix-primary);
    border-radius: 3px 3px 0 0;
}

/* Info Subtext */
.agent-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.agent-info-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b566b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-info-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--phoenix-primary);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.agent-info-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Grid & Cards */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.agent-card {
    background-color: #ffffff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: #cfd6e4;
}

.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.agent-card-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.icon-blue {
    background-color: #e8f2ff;
    color: #1c84ee;
}

.icon-green {
    background-color: #e6f9f0;
    color: #34d399;
}

.icon-orange {
    background-color: #fff4eb;
    color: #f97316;
}

.icon-purple {
    background-color: #f5f3ff;
    color: #8b5cf6;
}

.icon-yellow {
    background-color: #fefce8;
    color: #eab308;
}

.icon-red {
    background-color: #fef2f2;
    color: #ef4444;
}

.agent-card-star {
    font-size: 1rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.agent-card-star:hover {
    transform: scale(1.15);
}

.agent-card-star.active {
    color: #facc15;
}

.agent-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--phoenix-emphasis-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.agent-card-desc {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.agent-btn-start {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #4b566b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-btn-start:hover {
    background-color: var(--phoenix-primary);
    color: #ffffff;
    border-color: var(--phoenix-primary);
    box-shadow: 0 4px 10px rgba(174, 7, 40, 0.2);
}

.agent-btn-apply {
    background-color: #ffffff;
    border: 1px solid #e3e6ec;
    color: #4b566b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-btn-apply:hover {
    background-color: #f3f4f6;
    color: var(--phoenix-emphasis-color);
    border-color: #cfd6e4;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .agent-container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    .agent-welcome-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .agent-search-wrapper {
        max-width: 100%;
    }
}

/* Responsive Sidebar Layout Alignments (Same as chat.css) */
@media (min-width: 992px) {
    .content {
        margin-left: 15.875rem !important;
        transition: margin-left 0.2s ease-in-out !important;
    }
    .navbar-vertical-collapsed .content {
        margin-left: 4rem !important;
    }
}
@media (max-width: 991.98px) {
    .content {
        margin-left: 0 !important;
    }
}

/* Automatically prefix required labels with a red asterisk */
.mb-3:has([required]) .form-label::before {
	content: "*";
	color: var(--phoenix-danger, #ef4444);
	margin-right: 0.2rem;
	font-weight: bold;
	font-size: 0.85rem;
	position: relative;
	top: -0.15em;
}

/* Guide popover button styles */
.guide-icon-container {
	cursor: pointer;
	margin-left: 0.35rem;
	display: inline-flex;
	align-items: center;
	outline: none;
	line-height: 1;
}

.guide-icon {
	color: #748194;
	transition: color 0.15s ease-in-out;
	font-size: 0.85rem;
	line-height: 1;
}

.guide-icon-container:hover .guide-icon, .guide-icon-container:focus .guide-icon {
	color: var(--phoenix-primary, #3874ff) !important;
}
