/* Added styles for tools button */
.chat-tools-btn {
    background: transparent; /* حذف رنگ پس‌زمینه */
    border: none; /* حذف کادر دور */
    padding: 6px; /* کمی فاصله برای کلیک‌پذیری راحت‌تر */
    cursor: pointer; /* تغییر نشانگر موس */
    color: #333333; /* رنگ آیکون (قابل تغییر) */
    transition: color 0.2s ease;
    border-radius: 50% !important;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
}

.chat-tools-btn svg {
    width: 18px;
    height: 18px;
    stroke: #000000;
}

.chat-tools-btn:hover:not(:disabled) {
    background: #dddee3;
    transform: scale(1.05);
}

.chat-tools-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Added styles for tools overlay modal */
.tools-overlay-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10002;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tools-overlay-modal.tools-show {
    display: flex;
    opacity: 1;
}

.tools-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.98);
    border-radius: var(--chat-border-radius);
}

.tools-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 51, 43, 0.3);
}

.tools-modal-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.tools-modal-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.tools-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.tools-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
}

.tools-search-container {
    position: relative;
    margin-bottom: 16px;
}

.tools-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.tools-search-input:focus {
    outline: none;
    border-color: var(--chat-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 51, 43, 0.2);
}

.tools-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.tools-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.tools-namad-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tools-namad-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tools-namad-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 51, 43, 0.5);
    transform: translateX(-2px);
}

.tools-namad-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tools-namad-symbol {
    color: white;
    font-size: 15px;
    font-weight: 600;
}

.tools-namad-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.tools-namad-select-btn {
    padding: 6px 16px;
    background: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tools-namad-select-btn:hover {
    background: #004d42;
    transform: scale(1.05);
}

.tools-namad-select-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tools-no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 20px;
    font-size: 14px;
}

.tools-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
    font-size: 14px;
}

/* Custom scrollbar for namad list */
.tools-namad-list::-webkit-scrollbar {
    width: 6px;
}

.tools-namad-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tools-namad-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tools-namad-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
